﻿using FreeSql;
using FreeSql.Internal;
using FreeSql.Internal.CommonProvider;
using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Xunit;

namespace FreeSql.InternalTests
{
    public class CommonUtilsTest
    {
        [Fact]
        public void WhereItemsInSplitOr()
        {
            var commonUtils = (g.sqlite.Select<WhereItems01>() as Select0Provider)._commonUtils;

            var pks = commonUtils.GetTableByEntity(typeof(WhereItems01)).Primarys;
            Assert.Equal("a.\"id\" = 1", commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 1).Select(a => new WhereItems01 { id = a })));
            Assert.Equal("a.\"id\" IN (1,2)", commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 2).Select(a => new WhereItems01 { id = a })));
            Assert.Equal("a.\"id\" IN (1,2,3,4,5,6,7,8,9,10)", commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 10).Select(a => new WhereItems01 { id = a })));
            var multiin = commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 1999).Select(a => new WhereItems01 { id = a }));
            Assert.Equal("a.\"id\" IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500) OR a.\"id\" IN (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000) OR a.\"id\" IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500) OR a.\"id\" IN (1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999)", multiin);
            
            pks = commonUtils.GetTableByEntity(typeof(WhereItems01)).Primarys;
            Assert.Equal("\"id\" = 1", commonUtils.WhereItems(pks, null, Enumerable.Range(1, 1).Select(a => new WhereItems01 { id = a })));
            Assert.Equal("\"id\" IN (1,2)", commonUtils.WhereItems(pks, null, Enumerable.Range(1, 2).Select(a => new WhereItems01 { id = a })));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10)", commonUtils.WhereItems(pks, null, Enumerable.Range(1, 10).Select(a => new WhereItems01 { id = a })));
            multiin = commonUtils.WhereItems(pks, null, Enumerable.Range(1, 1999).Select(a => new WhereItems01 { id = a }));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500) OR \"id\" IN (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000) OR \"id\" IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500) OR \"id\" IN (1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999)", multiin);

            pks = commonUtils.GetTableByEntity(typeof(WhereItems01)).Primarys;
            Assert.Equal("\"id\" = 1", commonUtils.WhereItems(pks, "", Enumerable.Range(1, 1).Select(a => new WhereItems01 { id = a })));
            Assert.Equal("\"id\" IN (1,2)", commonUtils.WhereItems(pks, "", Enumerable.Range(1, 2).Select(a => new WhereItems01 { id = a })));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10)", commonUtils.WhereItems(pks, "", Enumerable.Range(1, 10).Select(a => new WhereItems01 { id = a })));
            multiin = commonUtils.WhereItems(pks, "", Enumerable.Range(1, 1999).Select(a => new WhereItems01 { id = a }));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500) OR \"id\" IN (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000) OR \"id\" IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500) OR \"id\" IN (1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999)", multiin);


            pks = new[] { commonUtils.GetTableByEntity(typeof(WhereItems01)).ColumnsByCs["code"] };
            Assert.Equal("a.\"code\" = 'code1'", commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 1).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            Assert.Equal("a.\"code\" IN ('code1','code2')", commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 2).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            Assert.Equal("a.\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10')", commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 10).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            multiin = commonUtils.WhereItems(pks, "a.", Enumerable.Range(1, 1999).Select(a => new WhereItems01 { id = a, code = "code" + a }));
            Assert.Equal("a.\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10','code11','code12','code13','code14','code15','code16','code17','code18','code19','code20','code21','code22','code23','code24','code25','code26','code27','code28','code29','code30','code31','code32','code33','code34','code35','code36','code37','code38','code39','code40','code41','code42','code43','code44','code45','code46','code47','code48','code49','code50','code51','code52','code53','code54','code55','code56','code57','code58','code59','code60','code61','code62','code63','code64','code65','code66','code67','code68','code69','code70','code71','code72','code73','code74','code75','code76','code77','code78','code79','code80','code81','code82','code83','code84','code85','code86','code87','code88','code89','code90','code91','code92','code93','code94','code95','code96','code97','code98','code99','code100','code101','code102','code103','code104','code105','code106','code107','code108','code109','code110','code111','code112','code113','code114','code115','code116','code117','code118','code119','code120','code121','code122','code123','code124','code125','code126','code127','code128','code129','code130','code131','code132','code133','code134','code135','code136','code137','code138','code139','code140','code141','code142','code143','code144','code145','code146','code147','code148','code149','code150','code151','code152','code153','code154','code155','code156','code157','code158','code159','code160','code161','code162','code163','code164','code165','code166','code167','code168','code169','code170','code171','code172','code173','code174','code175','code176','code177','code178','code179','code180','code181','code182','code183','code184','code185','code186','code187','code188','code189','code190','code191','code192','code193','code194','code195','code196','code197','code198','code199','code200','code201','code202','code203','code204','code205','code206','code207','code208','code209','code210','code211','code212','code213','code214','code215','code216','code217','code218','code219','code220','code221','code222','code223','code224','code225','code226','code227','code228','code229','code230','code231','code232','code233','code234','code235','code236','code237','code238','code239','code240','code241','code242','code243','code244','code245','code246','code247','code248','code249','code250','code251','code252','code253','code254','code255','code256','code257','code258','code259','code260','code261','code262','code263','code264','code265','code266','code267','code268','code269','code270','code271','code272','code273','code274','code275','code276','code277','code278','code279','code280','code281','code282','code283','code284','code285','code286','code287','code288','code289','code290','code291','code292','code293','code294','code295','code296','code297','code298','code299','code300','code301','code302','code303','code304','code305','code306','code307','code308','code309','code310','code311','code312','code313','code314','code315','code316','code317','code318','code319','code320','code321','code322','code323','code324','code325','code326','code327','code328','code329','code330','code331','code332','code333','code334','code335','code336','code337','code338','code339','code340','code341','code342','code343','code344','code345','code346','code347','code348','code349','code350','code351','code352','code353','code354','code355','code356','code357','code358','code359','code360','code361','code362','code363','code364','code365','code366','code367','code368','code369','code370','code371','code372','code373','code374','code375','code376','code377','code378','code379','code380','code381','code382','code383','code384','code385','code386','code387','code388','code389','code390','code391','code392','code393','code394','code395','code396','code397','code398','code399','code400','code401','code402','code403','code404','code405','code406','code407','code408','code409','code410','code411','code412','code413','code414','code415','code416','code417','code418','code419','code420','code421','code422','code423','code424','code425','code426','code427','code428','code429','code430','code431','code432','code433','code434','code435','code436','code437','code438','code439','code440','code441','code442','code443','code444','code445','code446','code447','code448','code449','code450','code451','code452','code453','code454','code455','code456','code457','code458','code459','code460','code461','code462','code463','code464','code465','code466','code467','code468','code469','code470','code471','code472','code473','code474','code475','code476','code477','code478','code479','code480','code481','code482','code483','code484','code485','code486','code487','code488','code489','code490','code491','code492','code493','code494','code495','code496','code497','code498','code499','code500') OR a.\"code\" IN ('code501','code502','code503','code504','code505','code506','code507','code508','code509','code510','code511','code512','code513','code514','code515','code516','code517','code518','code519','code520','code521','code522','code523','code524','code525','code526','code527','code528','code529','code530','code531','code532','code533','code534','code535','code536','code537','code538','code539','code540','code541','code542','code543','code544','code545','code546','code547','code548','code549','code550','code551','code552','code553','code554','code555','code556','code557','code558','code559','code560','code561','code562','code563','code564','code565','code566','code567','code568','code569','code570','code571','code572','code573','code574','code575','code576','code577','code578','code579','code580','code581','code582','code583','code584','code585','code586','code587','code588','code589','code590','code591','code592','code593','code594','code595','code596','code597','code598','code599','code600','code601','code602','code603','code604','code605','code606','code607','code608','code609','code610','code611','code612','code613','code614','code615','code616','code617','code618','code619','code620','code621','code622','code623','code624','code625','code626','code627','code628','code629','code630','code631','code632','code633','code634','code635','code636','code637','code638','code639','code640','code641','code642','code643','code644','code645','code646','code647','code648','code649','code650','code651','code652','code653','code654','code655','code656','code657','code658','code659','code660','code661','code662','code663','code664','code665','code666','code667','code668','code669','code670','code671','code672','code673','code674','code675','code676','code677','code678','code679','code680','code681','code682','code683','code684','code685','code686','code687','code688','code689','code690','code691','code692','code693','code694','code695','code696','code697','code698','code699','code700','code701','code702','code703','code704','code705','code706','code707','code708','code709','code710','code711','code712','code713','code714','code715','code716','code717','code718','code719','code720','code721','code722','code723','code724','code725','code726','code727','code728','code729','code730','code731','code732','code733','code734','code735','code736','code737','code738','code739','code740','code741','code742','code743','code744','code745','code746','code747','code748','code749','code750','code751','code752','code753','code754','code755','code756','code757','code758','code759','code760','code761','code762','code763','code764','code765','code766','code767','code768','code769','code770','code771','code772','code773','code774','code775','code776','code777','code778','code779','code780','code781','code782','code783','code784','code785','code786','code787','code788','code789','code790','code791','code792','code793','code794','code795','code796','code797','code798','code799','code800','code801','code802','code803','code804','code805','code806','code807','code808','code809','code810','code811','code812','code813','code814','code815','code816','code817','code818','code819','code820','code821','code822','code823','code824','code825','code826','code827','code828','code829','code830','code831','code832','code833','code834','code835','code836','code837','code838','code839','code840','code841','code842','code843','code844','code845','code846','code847','code848','code849','code850','code851','code852','code853','code854','code855','code856','code857','code858','code859','code860','code861','code862','code863','code864','code865','code866','code867','code868','code869','code870','code871','code872','code873','code874','code875','code876','code877','code878','code879','code880','code881','code882','code883','code884','code885','code886','code887','code888','code889','code890','code891','code892','code893','code894','code895','code896','code897','code898','code899','code900','code901','code902','code903','code904','code905','code906','code907','code908','code909','code910','code911','code912','code913','code914','code915','code916','code917','code918','code919','code920','code921','code922','code923','code924','code925','code926','code927','code928','code929','code930','code931','code932','code933','code934','code935','code936','code937','code938','code939','code940','code941','code942','code943','code944','code945','code946','code947','code948','code949','code950','code951','code952','code953','code954','code955','code956','code957','code958','code959','code960','code961','code962','code963','code964','code965','code966','code967','code968','code969','code970','code971','code972','code973','code974','code975','code976','code977','code978','code979','code980','code981','code982','code983','code984','code985','code986','code987','code988','code989','code990','code991','code992','code993','code994','code995','code996','code997','code998','code999','code1000') OR a.\"code\" IN ('code1001','code1002','code1003','code1004','code1005','code1006','code1007','code1008','code1009','code1010','code1011','code1012','code1013','code1014','code1015','code1016','code1017','code1018','code1019','code1020','code1021','code1022','code1023','code1024','code1025','code1026','code1027','code1028','code1029','code1030','code1031','code1032','code1033','code1034','code1035','code1036','code1037','code1038','code1039','code1040','code1041','code1042','code1043','code1044','code1045','code1046','code1047','code1048','code1049','code1050','code1051','code1052','code1053','code1054','code1055','code1056','code1057','code1058','code1059','code1060','code1061','code1062','code1063','code1064','code1065','code1066','code1067','code1068','code1069','code1070','code1071','code1072','code1073','code1074','code1075','code1076','code1077','code1078','code1079','code1080','code1081','code1082','code1083','code1084','code1085','code1086','code1087','code1088','code1089','code1090','code1091','code1092','code1093','code1094','code1095','code1096','code1097','code1098','code1099','code1100','code1101','code1102','code1103','code1104','code1105','code1106','code1107','code1108','code1109','code1110','code1111','code1112','code1113','code1114','code1115','code1116','code1117','code1118','code1119','code1120','code1121','code1122','code1123','code1124','code1125','code1126','code1127','code1128','code1129','code1130','code1131','code1132','code1133','code1134','code1135','code1136','code1137','code1138','code1139','code1140','code1141','code1142','code1143','code1144','code1145','code1146','code1147','code1148','code1149','code1150','code1151','code1152','code1153','code1154','code1155','code1156','code1157','code1158','code1159','code1160','code1161','code1162','code1163','code1164','code1165','code1166','code1167','code1168','code1169','code1170','code1171','code1172','code1173','code1174','code1175','code1176','code1177','code1178','code1179','code1180','code1181','code1182','code1183','code1184','code1185','code1186','code1187','code1188','code1189','code1190','code1191','code1192','code1193','code1194','code1195','code1196','code1197','code1198','code1199','code1200','code1201','code1202','code1203','code1204','code1205','code1206','code1207','code1208','code1209','code1210','code1211','code1212','code1213','code1214','code1215','code1216','code1217','code1218','code1219','code1220','code1221','code1222','code1223','code1224','code1225','code1226','code1227','code1228','code1229','code1230','code1231','code1232','code1233','code1234','code1235','code1236','code1237','code1238','code1239','code1240','code1241','code1242','code1243','code1244','code1245','code1246','code1247','code1248','code1249','code1250','code1251','code1252','code1253','code1254','code1255','code1256','code1257','code1258','code1259','code1260','code1261','code1262','code1263','code1264','code1265','code1266','code1267','code1268','code1269','code1270','code1271','code1272','code1273','code1274','code1275','code1276','code1277','code1278','code1279','code1280','code1281','code1282','code1283','code1284','code1285','code1286','code1287','code1288','code1289','code1290','code1291','code1292','code1293','code1294','code1295','code1296','code1297','code1298','code1299','code1300','code1301','code1302','code1303','code1304','code1305','code1306','code1307','code1308','code1309','code1310','code1311','code1312','code1313','code1314','code1315','code1316','code1317','code1318','code1319','code1320','code1321','code1322','code1323','code1324','code1325','code1326','code1327','code1328','code1329','code1330','code1331','code1332','code1333','code1334','code1335','code1336','code1337','code1338','code1339','code1340','code1341','code1342','code1343','code1344','code1345','code1346','code1347','code1348','code1349','code1350','code1351','code1352','code1353','code1354','code1355','code1356','code1357','code1358','code1359','code1360','code1361','code1362','code1363','code1364','code1365','code1366','code1367','code1368','code1369','code1370','code1371','code1372','code1373','code1374','code1375','code1376','code1377','code1378','code1379','code1380','code1381','code1382','code1383','code1384','code1385','code1386','code1387','code1388','code1389','code1390','code1391','code1392','code1393','code1394','code1395','code1396','code1397','code1398','code1399','code1400','code1401','code1402','code1403','code1404','code1405','code1406','code1407','code1408','code1409','code1410','code1411','code1412','code1413','code1414','code1415','code1416','code1417','code1418','code1419','code1420','code1421','code1422','code1423','code1424','code1425','code1426','code1427','code1428','code1429','code1430','code1431','code1432','code1433','code1434','code1435','code1436','code1437','code1438','code1439','code1440','code1441','code1442','code1443','code1444','code1445','code1446','code1447','code1448','code1449','code1450','code1451','code1452','code1453','code1454','code1455','code1456','code1457','code1458','code1459','code1460','code1461','code1462','code1463','code1464','code1465','code1466','code1467','code1468','code1469','code1470','code1471','code1472','code1473','code1474','code1475','code1476','code1477','code1478','code1479','code1480','code1481','code1482','code1483','code1484','code1485','code1486','code1487','code1488','code1489','code1490','code1491','code1492','code1493','code1494','code1495','code1496','code1497','code1498','code1499','code1500') OR a.\"code\" IN ('code1501','code1502','code1503','code1504','code1505','code1506','code1507','code1508','code1509','code1510','code1511','code1512','code1513','code1514','code1515','code1516','code1517','code1518','code1519','code1520','code1521','code1522','code1523','code1524','code1525','code1526','code1527','code1528','code1529','code1530','code1531','code1532','code1533','code1534','code1535','code1536','code1537','code1538','code1539','code1540','code1541','code1542','code1543','code1544','code1545','code1546','code1547','code1548','code1549','code1550','code1551','code1552','code1553','code1554','code1555','code1556','code1557','code1558','code1559','code1560','code1561','code1562','code1563','code1564','code1565','code1566','code1567','code1568','code1569','code1570','code1571','code1572','code1573','code1574','code1575','code1576','code1577','code1578','code1579','code1580','code1581','code1582','code1583','code1584','code1585','code1586','code1587','code1588','code1589','code1590','code1591','code1592','code1593','code1594','code1595','code1596','code1597','code1598','code1599','code1600','code1601','code1602','code1603','code1604','code1605','code1606','code1607','code1608','code1609','code1610','code1611','code1612','code1613','code1614','code1615','code1616','code1617','code1618','code1619','code1620','code1621','code1622','code1623','code1624','code1625','code1626','code1627','code1628','code1629','code1630','code1631','code1632','code1633','code1634','code1635','code1636','code1637','code1638','code1639','code1640','code1641','code1642','code1643','code1644','code1645','code1646','code1647','code1648','code1649','code1650','code1651','code1652','code1653','code1654','code1655','code1656','code1657','code1658','code1659','code1660','code1661','code1662','code1663','code1664','code1665','code1666','code1667','code1668','code1669','code1670','code1671','code1672','code1673','code1674','code1675','code1676','code1677','code1678','code1679','code1680','code1681','code1682','code1683','code1684','code1685','code1686','code1687','code1688','code1689','code1690','code1691','code1692','code1693','code1694','code1695','code1696','code1697','code1698','code1699','code1700','code1701','code1702','code1703','code1704','code1705','code1706','code1707','code1708','code1709','code1710','code1711','code1712','code1713','code1714','code1715','code1716','code1717','code1718','code1719','code1720','code1721','code1722','code1723','code1724','code1725','code1726','code1727','code1728','code1729','code1730','code1731','code1732','code1733','code1734','code1735','code1736','code1737','code1738','code1739','code1740','code1741','code1742','code1743','code1744','code1745','code1746','code1747','code1748','code1749','code1750','code1751','code1752','code1753','code1754','code1755','code1756','code1757','code1758','code1759','code1760','code1761','code1762','code1763','code1764','code1765','code1766','code1767','code1768','code1769','code1770','code1771','code1772','code1773','code1774','code1775','code1776','code1777','code1778','code1779','code1780','code1781','code1782','code1783','code1784','code1785','code1786','code1787','code1788','code1789','code1790','code1791','code1792','code1793','code1794','code1795','code1796','code1797','code1798','code1799','code1800','code1801','code1802','code1803','code1804','code1805','code1806','code1807','code1808','code1809','code1810','code1811','code1812','code1813','code1814','code1815','code1816','code1817','code1818','code1819','code1820','code1821','code1822','code1823','code1824','code1825','code1826','code1827','code1828','code1829','code1830','code1831','code1832','code1833','code1834','code1835','code1836','code1837','code1838','code1839','code1840','code1841','code1842','code1843','code1844','code1845','code1846','code1847','code1848','code1849','code1850','code1851','code1852','code1853','code1854','code1855','code1856','code1857','code1858','code1859','code1860','code1861','code1862','code1863','code1864','code1865','code1866','code1867','code1868','code1869','code1870','code1871','code1872','code1873','code1874','code1875','code1876','code1877','code1878','code1879','code1880','code1881','code1882','code1883','code1884','code1885','code1886','code1887','code1888','code1889','code1890','code1891','code1892','code1893','code1894','code1895','code1896','code1897','code1898','code1899','code1900','code1901','code1902','code1903','code1904','code1905','code1906','code1907','code1908','code1909','code1910','code1911','code1912','code1913','code1914','code1915','code1916','code1917','code1918','code1919','code1920','code1921','code1922','code1923','code1924','code1925','code1926','code1927','code1928','code1929','code1930','code1931','code1932','code1933','code1934','code1935','code1936','code1937','code1938','code1939','code1940','code1941','code1942','code1943','code1944','code1945','code1946','code1947','code1948','code1949','code1950','code1951','code1952','code1953','code1954','code1955','code1956','code1957','code1958','code1959','code1960','code1961','code1962','code1963','code1964','code1965','code1966','code1967','code1968','code1969','code1970','code1971','code1972','code1973','code1974','code1975','code1976','code1977','code1978','code1979','code1980','code1981','code1982','code1983','code1984','code1985','code1986','code1987','code1988','code1989','code1990','code1991','code1992','code1993','code1994','code1995','code1996','code1997','code1998','code1999')", multiin);

            pks = new[] { commonUtils.GetTableByEntity(typeof(WhereItems01)).ColumnsByCs["code"] };
            Assert.Equal("\"code\" = 'code1'", commonUtils.WhereItems(pks, null, Enumerable.Range(1, 1).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2')", commonUtils.WhereItems(pks, null, Enumerable.Range(1, 2).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10')", commonUtils.WhereItems(pks, null, Enumerable.Range(1, 10).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            multiin = commonUtils.WhereItems(pks, null, Enumerable.Range(1, 1999).Select(a => new WhereItems01 { id = a, code = "code" + a }));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10','code11','code12','code13','code14','code15','code16','code17','code18','code19','code20','code21','code22','code23','code24','code25','code26','code27','code28','code29','code30','code31','code32','code33','code34','code35','code36','code37','code38','code39','code40','code41','code42','code43','code44','code45','code46','code47','code48','code49','code50','code51','code52','code53','code54','code55','code56','code57','code58','code59','code60','code61','code62','code63','code64','code65','code66','code67','code68','code69','code70','code71','code72','code73','code74','code75','code76','code77','code78','code79','code80','code81','code82','code83','code84','code85','code86','code87','code88','code89','code90','code91','code92','code93','code94','code95','code96','code97','code98','code99','code100','code101','code102','code103','code104','code105','code106','code107','code108','code109','code110','code111','code112','code113','code114','code115','code116','code117','code118','code119','code120','code121','code122','code123','code124','code125','code126','code127','code128','code129','code130','code131','code132','code133','code134','code135','code136','code137','code138','code139','code140','code141','code142','code143','code144','code145','code146','code147','code148','code149','code150','code151','code152','code153','code154','code155','code156','code157','code158','code159','code160','code161','code162','code163','code164','code165','code166','code167','code168','code169','code170','code171','code172','code173','code174','code175','code176','code177','code178','code179','code180','code181','code182','code183','code184','code185','code186','code187','code188','code189','code190','code191','code192','code193','code194','code195','code196','code197','code198','code199','code200','code201','code202','code203','code204','code205','code206','code207','code208','code209','code210','code211','code212','code213','code214','code215','code216','code217','code218','code219','code220','code221','code222','code223','code224','code225','code226','code227','code228','code229','code230','code231','code232','code233','code234','code235','code236','code237','code238','code239','code240','code241','code242','code243','code244','code245','code246','code247','code248','code249','code250','code251','code252','code253','code254','code255','code256','code257','code258','code259','code260','code261','code262','code263','code264','code265','code266','code267','code268','code269','code270','code271','code272','code273','code274','code275','code276','code277','code278','code279','code280','code281','code282','code283','code284','code285','code286','code287','code288','code289','code290','code291','code292','code293','code294','code295','code296','code297','code298','code299','code300','code301','code302','code303','code304','code305','code306','code307','code308','code309','code310','code311','code312','code313','code314','code315','code316','code317','code318','code319','code320','code321','code322','code323','code324','code325','code326','code327','code328','code329','code330','code331','code332','code333','code334','code335','code336','code337','code338','code339','code340','code341','code342','code343','code344','code345','code346','code347','code348','code349','code350','code351','code352','code353','code354','code355','code356','code357','code358','code359','code360','code361','code362','code363','code364','code365','code366','code367','code368','code369','code370','code371','code372','code373','code374','code375','code376','code377','code378','code379','code380','code381','code382','code383','code384','code385','code386','code387','code388','code389','code390','code391','code392','code393','code394','code395','code396','code397','code398','code399','code400','code401','code402','code403','code404','code405','code406','code407','code408','code409','code410','code411','code412','code413','code414','code415','code416','code417','code418','code419','code420','code421','code422','code423','code424','code425','code426','code427','code428','code429','code430','code431','code432','code433','code434','code435','code436','code437','code438','code439','code440','code441','code442','code443','code444','code445','code446','code447','code448','code449','code450','code451','code452','code453','code454','code455','code456','code457','code458','code459','code460','code461','code462','code463','code464','code465','code466','code467','code468','code469','code470','code471','code472','code473','code474','code475','code476','code477','code478','code479','code480','code481','code482','code483','code484','code485','code486','code487','code488','code489','code490','code491','code492','code493','code494','code495','code496','code497','code498','code499','code500') OR \"code\" IN ('code501','code502','code503','code504','code505','code506','code507','code508','code509','code510','code511','code512','code513','code514','code515','code516','code517','code518','code519','code520','code521','code522','code523','code524','code525','code526','code527','code528','code529','code530','code531','code532','code533','code534','code535','code536','code537','code538','code539','code540','code541','code542','code543','code544','code545','code546','code547','code548','code549','code550','code551','code552','code553','code554','code555','code556','code557','code558','code559','code560','code561','code562','code563','code564','code565','code566','code567','code568','code569','code570','code571','code572','code573','code574','code575','code576','code577','code578','code579','code580','code581','code582','code583','code584','code585','code586','code587','code588','code589','code590','code591','code592','code593','code594','code595','code596','code597','code598','code599','code600','code601','code602','code603','code604','code605','code606','code607','code608','code609','code610','code611','code612','code613','code614','code615','code616','code617','code618','code619','code620','code621','code622','code623','code624','code625','code626','code627','code628','code629','code630','code631','code632','code633','code634','code635','code636','code637','code638','code639','code640','code641','code642','code643','code644','code645','code646','code647','code648','code649','code650','code651','code652','code653','code654','code655','code656','code657','code658','code659','code660','code661','code662','code663','code664','code665','code666','code667','code668','code669','code670','code671','code672','code673','code674','code675','code676','code677','code678','code679','code680','code681','code682','code683','code684','code685','code686','code687','code688','code689','code690','code691','code692','code693','code694','code695','code696','code697','code698','code699','code700','code701','code702','code703','code704','code705','code706','code707','code708','code709','code710','code711','code712','code713','code714','code715','code716','code717','code718','code719','code720','code721','code722','code723','code724','code725','code726','code727','code728','code729','code730','code731','code732','code733','code734','code735','code736','code737','code738','code739','code740','code741','code742','code743','code744','code745','code746','code747','code748','code749','code750','code751','code752','code753','code754','code755','code756','code757','code758','code759','code760','code761','code762','code763','code764','code765','code766','code767','code768','code769','code770','code771','code772','code773','code774','code775','code776','code777','code778','code779','code780','code781','code782','code783','code784','code785','code786','code787','code788','code789','code790','code791','code792','code793','code794','code795','code796','code797','code798','code799','code800','code801','code802','code803','code804','code805','code806','code807','code808','code809','code810','code811','code812','code813','code814','code815','code816','code817','code818','code819','code820','code821','code822','code823','code824','code825','code826','code827','code828','code829','code830','code831','code832','code833','code834','code835','code836','code837','code838','code839','code840','code841','code842','code843','code844','code845','code846','code847','code848','code849','code850','code851','code852','code853','code854','code855','code856','code857','code858','code859','code860','code861','code862','code863','code864','code865','code866','code867','code868','code869','code870','code871','code872','code873','code874','code875','code876','code877','code878','code879','code880','code881','code882','code883','code884','code885','code886','code887','code888','code889','code890','code891','code892','code893','code894','code895','code896','code897','code898','code899','code900','code901','code902','code903','code904','code905','code906','code907','code908','code909','code910','code911','code912','code913','code914','code915','code916','code917','code918','code919','code920','code921','code922','code923','code924','code925','code926','code927','code928','code929','code930','code931','code932','code933','code934','code935','code936','code937','code938','code939','code940','code941','code942','code943','code944','code945','code946','code947','code948','code949','code950','code951','code952','code953','code954','code955','code956','code957','code958','code959','code960','code961','code962','code963','code964','code965','code966','code967','code968','code969','code970','code971','code972','code973','code974','code975','code976','code977','code978','code979','code980','code981','code982','code983','code984','code985','code986','code987','code988','code989','code990','code991','code992','code993','code994','code995','code996','code997','code998','code999','code1000') OR \"code\" IN ('code1001','code1002','code1003','code1004','code1005','code1006','code1007','code1008','code1009','code1010','code1011','code1012','code1013','code1014','code1015','code1016','code1017','code1018','code1019','code1020','code1021','code1022','code1023','code1024','code1025','code1026','code1027','code1028','code1029','code1030','code1031','code1032','code1033','code1034','code1035','code1036','code1037','code1038','code1039','code1040','code1041','code1042','code1043','code1044','code1045','code1046','code1047','code1048','code1049','code1050','code1051','code1052','code1053','code1054','code1055','code1056','code1057','code1058','code1059','code1060','code1061','code1062','code1063','code1064','code1065','code1066','code1067','code1068','code1069','code1070','code1071','code1072','code1073','code1074','code1075','code1076','code1077','code1078','code1079','code1080','code1081','code1082','code1083','code1084','code1085','code1086','code1087','code1088','code1089','code1090','code1091','code1092','code1093','code1094','code1095','code1096','code1097','code1098','code1099','code1100','code1101','code1102','code1103','code1104','code1105','code1106','code1107','code1108','code1109','code1110','code1111','code1112','code1113','code1114','code1115','code1116','code1117','code1118','code1119','code1120','code1121','code1122','code1123','code1124','code1125','code1126','code1127','code1128','code1129','code1130','code1131','code1132','code1133','code1134','code1135','code1136','code1137','code1138','code1139','code1140','code1141','code1142','code1143','code1144','code1145','code1146','code1147','code1148','code1149','code1150','code1151','code1152','code1153','code1154','code1155','code1156','code1157','code1158','code1159','code1160','code1161','code1162','code1163','code1164','code1165','code1166','code1167','code1168','code1169','code1170','code1171','code1172','code1173','code1174','code1175','code1176','code1177','code1178','code1179','code1180','code1181','code1182','code1183','code1184','code1185','code1186','code1187','code1188','code1189','code1190','code1191','code1192','code1193','code1194','code1195','code1196','code1197','code1198','code1199','code1200','code1201','code1202','code1203','code1204','code1205','code1206','code1207','code1208','code1209','code1210','code1211','code1212','code1213','code1214','code1215','code1216','code1217','code1218','code1219','code1220','code1221','code1222','code1223','code1224','code1225','code1226','code1227','code1228','code1229','code1230','code1231','code1232','code1233','code1234','code1235','code1236','code1237','code1238','code1239','code1240','code1241','code1242','code1243','code1244','code1245','code1246','code1247','code1248','code1249','code1250','code1251','code1252','code1253','code1254','code1255','code1256','code1257','code1258','code1259','code1260','code1261','code1262','code1263','code1264','code1265','code1266','code1267','code1268','code1269','code1270','code1271','code1272','code1273','code1274','code1275','code1276','code1277','code1278','code1279','code1280','code1281','code1282','code1283','code1284','code1285','code1286','code1287','code1288','code1289','code1290','code1291','code1292','code1293','code1294','code1295','code1296','code1297','code1298','code1299','code1300','code1301','code1302','code1303','code1304','code1305','code1306','code1307','code1308','code1309','code1310','code1311','code1312','code1313','code1314','code1315','code1316','code1317','code1318','code1319','code1320','code1321','code1322','code1323','code1324','code1325','code1326','code1327','code1328','code1329','code1330','code1331','code1332','code1333','code1334','code1335','code1336','code1337','code1338','code1339','code1340','code1341','code1342','code1343','code1344','code1345','code1346','code1347','code1348','code1349','code1350','code1351','code1352','code1353','code1354','code1355','code1356','code1357','code1358','code1359','code1360','code1361','code1362','code1363','code1364','code1365','code1366','code1367','code1368','code1369','code1370','code1371','code1372','code1373','code1374','code1375','code1376','code1377','code1378','code1379','code1380','code1381','code1382','code1383','code1384','code1385','code1386','code1387','code1388','code1389','code1390','code1391','code1392','code1393','code1394','code1395','code1396','code1397','code1398','code1399','code1400','code1401','code1402','code1403','code1404','code1405','code1406','code1407','code1408','code1409','code1410','code1411','code1412','code1413','code1414','code1415','code1416','code1417','code1418','code1419','code1420','code1421','code1422','code1423','code1424','code1425','code1426','code1427','code1428','code1429','code1430','code1431','code1432','code1433','code1434','code1435','code1436','code1437','code1438','code1439','code1440','code1441','code1442','code1443','code1444','code1445','code1446','code1447','code1448','code1449','code1450','code1451','code1452','code1453','code1454','code1455','code1456','code1457','code1458','code1459','code1460','code1461','code1462','code1463','code1464','code1465','code1466','code1467','code1468','code1469','code1470','code1471','code1472','code1473','code1474','code1475','code1476','code1477','code1478','code1479','code1480','code1481','code1482','code1483','code1484','code1485','code1486','code1487','code1488','code1489','code1490','code1491','code1492','code1493','code1494','code1495','code1496','code1497','code1498','code1499','code1500') OR \"code\" IN ('code1501','code1502','code1503','code1504','code1505','code1506','code1507','code1508','code1509','code1510','code1511','code1512','code1513','code1514','code1515','code1516','code1517','code1518','code1519','code1520','code1521','code1522','code1523','code1524','code1525','code1526','code1527','code1528','code1529','code1530','code1531','code1532','code1533','code1534','code1535','code1536','code1537','code1538','code1539','code1540','code1541','code1542','code1543','code1544','code1545','code1546','code1547','code1548','code1549','code1550','code1551','code1552','code1553','code1554','code1555','code1556','code1557','code1558','code1559','code1560','code1561','code1562','code1563','code1564','code1565','code1566','code1567','code1568','code1569','code1570','code1571','code1572','code1573','code1574','code1575','code1576','code1577','code1578','code1579','code1580','code1581','code1582','code1583','code1584','code1585','code1586','code1587','code1588','code1589','code1590','code1591','code1592','code1593','code1594','code1595','code1596','code1597','code1598','code1599','code1600','code1601','code1602','code1603','code1604','code1605','code1606','code1607','code1608','code1609','code1610','code1611','code1612','code1613','code1614','code1615','code1616','code1617','code1618','code1619','code1620','code1621','code1622','code1623','code1624','code1625','code1626','code1627','code1628','code1629','code1630','code1631','code1632','code1633','code1634','code1635','code1636','code1637','code1638','code1639','code1640','code1641','code1642','code1643','code1644','code1645','code1646','code1647','code1648','code1649','code1650','code1651','code1652','code1653','code1654','code1655','code1656','code1657','code1658','code1659','code1660','code1661','code1662','code1663','code1664','code1665','code1666','code1667','code1668','code1669','code1670','code1671','code1672','code1673','code1674','code1675','code1676','code1677','code1678','code1679','code1680','code1681','code1682','code1683','code1684','code1685','code1686','code1687','code1688','code1689','code1690','code1691','code1692','code1693','code1694','code1695','code1696','code1697','code1698','code1699','code1700','code1701','code1702','code1703','code1704','code1705','code1706','code1707','code1708','code1709','code1710','code1711','code1712','code1713','code1714','code1715','code1716','code1717','code1718','code1719','code1720','code1721','code1722','code1723','code1724','code1725','code1726','code1727','code1728','code1729','code1730','code1731','code1732','code1733','code1734','code1735','code1736','code1737','code1738','code1739','code1740','code1741','code1742','code1743','code1744','code1745','code1746','code1747','code1748','code1749','code1750','code1751','code1752','code1753','code1754','code1755','code1756','code1757','code1758','code1759','code1760','code1761','code1762','code1763','code1764','code1765','code1766','code1767','code1768','code1769','code1770','code1771','code1772','code1773','code1774','code1775','code1776','code1777','code1778','code1779','code1780','code1781','code1782','code1783','code1784','code1785','code1786','code1787','code1788','code1789','code1790','code1791','code1792','code1793','code1794','code1795','code1796','code1797','code1798','code1799','code1800','code1801','code1802','code1803','code1804','code1805','code1806','code1807','code1808','code1809','code1810','code1811','code1812','code1813','code1814','code1815','code1816','code1817','code1818','code1819','code1820','code1821','code1822','code1823','code1824','code1825','code1826','code1827','code1828','code1829','code1830','code1831','code1832','code1833','code1834','code1835','code1836','code1837','code1838','code1839','code1840','code1841','code1842','code1843','code1844','code1845','code1846','code1847','code1848','code1849','code1850','code1851','code1852','code1853','code1854','code1855','code1856','code1857','code1858','code1859','code1860','code1861','code1862','code1863','code1864','code1865','code1866','code1867','code1868','code1869','code1870','code1871','code1872','code1873','code1874','code1875','code1876','code1877','code1878','code1879','code1880','code1881','code1882','code1883','code1884','code1885','code1886','code1887','code1888','code1889','code1890','code1891','code1892','code1893','code1894','code1895','code1896','code1897','code1898','code1899','code1900','code1901','code1902','code1903','code1904','code1905','code1906','code1907','code1908','code1909','code1910','code1911','code1912','code1913','code1914','code1915','code1916','code1917','code1918','code1919','code1920','code1921','code1922','code1923','code1924','code1925','code1926','code1927','code1928','code1929','code1930','code1931','code1932','code1933','code1934','code1935','code1936','code1937','code1938','code1939','code1940','code1941','code1942','code1943','code1944','code1945','code1946','code1947','code1948','code1949','code1950','code1951','code1952','code1953','code1954','code1955','code1956','code1957','code1958','code1959','code1960','code1961','code1962','code1963','code1964','code1965','code1966','code1967','code1968','code1969','code1970','code1971','code1972','code1973','code1974','code1975','code1976','code1977','code1978','code1979','code1980','code1981','code1982','code1983','code1984','code1985','code1986','code1987','code1988','code1989','code1990','code1991','code1992','code1993','code1994','code1995','code1996','code1997','code1998','code1999')", multiin);

            pks = new[] { commonUtils.GetTableByEntity(typeof(WhereItems01)).ColumnsByCs["code"] };
            Assert.Equal("\"code\" = 'code1'", commonUtils.WhereItems(pks, "", Enumerable.Range(1, 1).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2')", commonUtils.WhereItems(pks, "", Enumerable.Range(1, 2).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10')", commonUtils.WhereItems(pks, "", Enumerable.Range(1, 10).Select(a => new WhereItems01 { id = a, code = "code" + a })));
            multiin = commonUtils.WhereItems(pks, "", Enumerable.Range(1, 1999).Select(a => new WhereItems01 { id = a, code = "code" + a }));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10','code11','code12','code13','code14','code15','code16','code17','code18','code19','code20','code21','code22','code23','code24','code25','code26','code27','code28','code29','code30','code31','code32','code33','code34','code35','code36','code37','code38','code39','code40','code41','code42','code43','code44','code45','code46','code47','code48','code49','code50','code51','code52','code53','code54','code55','code56','code57','code58','code59','code60','code61','code62','code63','code64','code65','code66','code67','code68','code69','code70','code71','code72','code73','code74','code75','code76','code77','code78','code79','code80','code81','code82','code83','code84','code85','code86','code87','code88','code89','code90','code91','code92','code93','code94','code95','code96','code97','code98','code99','code100','code101','code102','code103','code104','code105','code106','code107','code108','code109','code110','code111','code112','code113','code114','code115','code116','code117','code118','code119','code120','code121','code122','code123','code124','code125','code126','code127','code128','code129','code130','code131','code132','code133','code134','code135','code136','code137','code138','code139','code140','code141','code142','code143','code144','code145','code146','code147','code148','code149','code150','code151','code152','code153','code154','code155','code156','code157','code158','code159','code160','code161','code162','code163','code164','code165','code166','code167','code168','code169','code170','code171','code172','code173','code174','code175','code176','code177','code178','code179','code180','code181','code182','code183','code184','code185','code186','code187','code188','code189','code190','code191','code192','code193','code194','code195','code196','code197','code198','code199','code200','code201','code202','code203','code204','code205','code206','code207','code208','code209','code210','code211','code212','code213','code214','code215','code216','code217','code218','code219','code220','code221','code222','code223','code224','code225','code226','code227','code228','code229','code230','code231','code232','code233','code234','code235','code236','code237','code238','code239','code240','code241','code242','code243','code244','code245','code246','code247','code248','code249','code250','code251','code252','code253','code254','code255','code256','code257','code258','code259','code260','code261','code262','code263','code264','code265','code266','code267','code268','code269','code270','code271','code272','code273','code274','code275','code276','code277','code278','code279','code280','code281','code282','code283','code284','code285','code286','code287','code288','code289','code290','code291','code292','code293','code294','code295','code296','code297','code298','code299','code300','code301','code302','code303','code304','code305','code306','code307','code308','code309','code310','code311','code312','code313','code314','code315','code316','code317','code318','code319','code320','code321','code322','code323','code324','code325','code326','code327','code328','code329','code330','code331','code332','code333','code334','code335','code336','code337','code338','code339','code340','code341','code342','code343','code344','code345','code346','code347','code348','code349','code350','code351','code352','code353','code354','code355','code356','code357','code358','code359','code360','code361','code362','code363','code364','code365','code366','code367','code368','code369','code370','code371','code372','code373','code374','code375','code376','code377','code378','code379','code380','code381','code382','code383','code384','code385','code386','code387','code388','code389','code390','code391','code392','code393','code394','code395','code396','code397','code398','code399','code400','code401','code402','code403','code404','code405','code406','code407','code408','code409','code410','code411','code412','code413','code414','code415','code416','code417','code418','code419','code420','code421','code422','code423','code424','code425','code426','code427','code428','code429','code430','code431','code432','code433','code434','code435','code436','code437','code438','code439','code440','code441','code442','code443','code444','code445','code446','code447','code448','code449','code450','code451','code452','code453','code454','code455','code456','code457','code458','code459','code460','code461','code462','code463','code464','code465','code466','code467','code468','code469','code470','code471','code472','code473','code474','code475','code476','code477','code478','code479','code480','code481','code482','code483','code484','code485','code486','code487','code488','code489','code490','code491','code492','code493','code494','code495','code496','code497','code498','code499','code500') OR \"code\" IN ('code501','code502','code503','code504','code505','code506','code507','code508','code509','code510','code511','code512','code513','code514','code515','code516','code517','code518','code519','code520','code521','code522','code523','code524','code525','code526','code527','code528','code529','code530','code531','code532','code533','code534','code535','code536','code537','code538','code539','code540','code541','code542','code543','code544','code545','code546','code547','code548','code549','code550','code551','code552','code553','code554','code555','code556','code557','code558','code559','code560','code561','code562','code563','code564','code565','code566','code567','code568','code569','code570','code571','code572','code573','code574','code575','code576','code577','code578','code579','code580','code581','code582','code583','code584','code585','code586','code587','code588','code589','code590','code591','code592','code593','code594','code595','code596','code597','code598','code599','code600','code601','code602','code603','code604','code605','code606','code607','code608','code609','code610','code611','code612','code613','code614','code615','code616','code617','code618','code619','code620','code621','code622','code623','code624','code625','code626','code627','code628','code629','code630','code631','code632','code633','code634','code635','code636','code637','code638','code639','code640','code641','code642','code643','code644','code645','code646','code647','code648','code649','code650','code651','code652','code653','code654','code655','code656','code657','code658','code659','code660','code661','code662','code663','code664','code665','code666','code667','code668','code669','code670','code671','code672','code673','code674','code675','code676','code677','code678','code679','code680','code681','code682','code683','code684','code685','code686','code687','code688','code689','code690','code691','code692','code693','code694','code695','code696','code697','code698','code699','code700','code701','code702','code703','code704','code705','code706','code707','code708','code709','code710','code711','code712','code713','code714','code715','code716','code717','code718','code719','code720','code721','code722','code723','code724','code725','code726','code727','code728','code729','code730','code731','code732','code733','code734','code735','code736','code737','code738','code739','code740','code741','code742','code743','code744','code745','code746','code747','code748','code749','code750','code751','code752','code753','code754','code755','code756','code757','code758','code759','code760','code761','code762','code763','code764','code765','code766','code767','code768','code769','code770','code771','code772','code773','code774','code775','code776','code777','code778','code779','code780','code781','code782','code783','code784','code785','code786','code787','code788','code789','code790','code791','code792','code793','code794','code795','code796','code797','code798','code799','code800','code801','code802','code803','code804','code805','code806','code807','code808','code809','code810','code811','code812','code813','code814','code815','code816','code817','code818','code819','code820','code821','code822','code823','code824','code825','code826','code827','code828','code829','code830','code831','code832','code833','code834','code835','code836','code837','code838','code839','code840','code841','code842','code843','code844','code845','code846','code847','code848','code849','code850','code851','code852','code853','code854','code855','code856','code857','code858','code859','code860','code861','code862','code863','code864','code865','code866','code867','code868','code869','code870','code871','code872','code873','code874','code875','code876','code877','code878','code879','code880','code881','code882','code883','code884','code885','code886','code887','code888','code889','code890','code891','code892','code893','code894','code895','code896','code897','code898','code899','code900','code901','code902','code903','code904','code905','code906','code907','code908','code909','code910','code911','code912','code913','code914','code915','code916','code917','code918','code919','code920','code921','code922','code923','code924','code925','code926','code927','code928','code929','code930','code931','code932','code933','code934','code935','code936','code937','code938','code939','code940','code941','code942','code943','code944','code945','code946','code947','code948','code949','code950','code951','code952','code953','code954','code955','code956','code957','code958','code959','code960','code961','code962','code963','code964','code965','code966','code967','code968','code969','code970','code971','code972','code973','code974','code975','code976','code977','code978','code979','code980','code981','code982','code983','code984','code985','code986','code987','code988','code989','code990','code991','code992','code993','code994','code995','code996','code997','code998','code999','code1000') OR \"code\" IN ('code1001','code1002','code1003','code1004','code1005','code1006','code1007','code1008','code1009','code1010','code1011','code1012','code1013','code1014','code1015','code1016','code1017','code1018','code1019','code1020','code1021','code1022','code1023','code1024','code1025','code1026','code1027','code1028','code1029','code1030','code1031','code1032','code1033','code1034','code1035','code1036','code1037','code1038','code1039','code1040','code1041','code1042','code1043','code1044','code1045','code1046','code1047','code1048','code1049','code1050','code1051','code1052','code1053','code1054','code1055','code1056','code1057','code1058','code1059','code1060','code1061','code1062','code1063','code1064','code1065','code1066','code1067','code1068','code1069','code1070','code1071','code1072','code1073','code1074','code1075','code1076','code1077','code1078','code1079','code1080','code1081','code1082','code1083','code1084','code1085','code1086','code1087','code1088','code1089','code1090','code1091','code1092','code1093','code1094','code1095','code1096','code1097','code1098','code1099','code1100','code1101','code1102','code1103','code1104','code1105','code1106','code1107','code1108','code1109','code1110','code1111','code1112','code1113','code1114','code1115','code1116','code1117','code1118','code1119','code1120','code1121','code1122','code1123','code1124','code1125','code1126','code1127','code1128','code1129','code1130','code1131','code1132','code1133','code1134','code1135','code1136','code1137','code1138','code1139','code1140','code1141','code1142','code1143','code1144','code1145','code1146','code1147','code1148','code1149','code1150','code1151','code1152','code1153','code1154','code1155','code1156','code1157','code1158','code1159','code1160','code1161','code1162','code1163','code1164','code1165','code1166','code1167','code1168','code1169','code1170','code1171','code1172','code1173','code1174','code1175','code1176','code1177','code1178','code1179','code1180','code1181','code1182','code1183','code1184','code1185','code1186','code1187','code1188','code1189','code1190','code1191','code1192','code1193','code1194','code1195','code1196','code1197','code1198','code1199','code1200','code1201','code1202','code1203','code1204','code1205','code1206','code1207','code1208','code1209','code1210','code1211','code1212','code1213','code1214','code1215','code1216','code1217','code1218','code1219','code1220','code1221','code1222','code1223','code1224','code1225','code1226','code1227','code1228','code1229','code1230','code1231','code1232','code1233','code1234','code1235','code1236','code1237','code1238','code1239','code1240','code1241','code1242','code1243','code1244','code1245','code1246','code1247','code1248','code1249','code1250','code1251','code1252','code1253','code1254','code1255','code1256','code1257','code1258','code1259','code1260','code1261','code1262','code1263','code1264','code1265','code1266','code1267','code1268','code1269','code1270','code1271','code1272','code1273','code1274','code1275','code1276','code1277','code1278','code1279','code1280','code1281','code1282','code1283','code1284','code1285','code1286','code1287','code1288','code1289','code1290','code1291','code1292','code1293','code1294','code1295','code1296','code1297','code1298','code1299','code1300','code1301','code1302','code1303','code1304','code1305','code1306','code1307','code1308','code1309','code1310','code1311','code1312','code1313','code1314','code1315','code1316','code1317','code1318','code1319','code1320','code1321','code1322','code1323','code1324','code1325','code1326','code1327','code1328','code1329','code1330','code1331','code1332','code1333','code1334','code1335','code1336','code1337','code1338','code1339','code1340','code1341','code1342','code1343','code1344','code1345','code1346','code1347','code1348','code1349','code1350','code1351','code1352','code1353','code1354','code1355','code1356','code1357','code1358','code1359','code1360','code1361','code1362','code1363','code1364','code1365','code1366','code1367','code1368','code1369','code1370','code1371','code1372','code1373','code1374','code1375','code1376','code1377','code1378','code1379','code1380','code1381','code1382','code1383','code1384','code1385','code1386','code1387','code1388','code1389','code1390','code1391','code1392','code1393','code1394','code1395','code1396','code1397','code1398','code1399','code1400','code1401','code1402','code1403','code1404','code1405','code1406','code1407','code1408','code1409','code1410','code1411','code1412','code1413','code1414','code1415','code1416','code1417','code1418','code1419','code1420','code1421','code1422','code1423','code1424','code1425','code1426','code1427','code1428','code1429','code1430','code1431','code1432','code1433','code1434','code1435','code1436','code1437','code1438','code1439','code1440','code1441','code1442','code1443','code1444','code1445','code1446','code1447','code1448','code1449','code1450','code1451','code1452','code1453','code1454','code1455','code1456','code1457','code1458','code1459','code1460','code1461','code1462','code1463','code1464','code1465','code1466','code1467','code1468','code1469','code1470','code1471','code1472','code1473','code1474','code1475','code1476','code1477','code1478','code1479','code1480','code1481','code1482','code1483','code1484','code1485','code1486','code1487','code1488','code1489','code1490','code1491','code1492','code1493','code1494','code1495','code1496','code1497','code1498','code1499','code1500') OR \"code\" IN ('code1501','code1502','code1503','code1504','code1505','code1506','code1507','code1508','code1509','code1510','code1511','code1512','code1513','code1514','code1515','code1516','code1517','code1518','code1519','code1520','code1521','code1522','code1523','code1524','code1525','code1526','code1527','code1528','code1529','code1530','code1531','code1532','code1533','code1534','code1535','code1536','code1537','code1538','code1539','code1540','code1541','code1542','code1543','code1544','code1545','code1546','code1547','code1548','code1549','code1550','code1551','code1552','code1553','code1554','code1555','code1556','code1557','code1558','code1559','code1560','code1561','code1562','code1563','code1564','code1565','code1566','code1567','code1568','code1569','code1570','code1571','code1572','code1573','code1574','code1575','code1576','code1577','code1578','code1579','code1580','code1581','code1582','code1583','code1584','code1585','code1586','code1587','code1588','code1589','code1590','code1591','code1592','code1593','code1594','code1595','code1596','code1597','code1598','code1599','code1600','code1601','code1602','code1603','code1604','code1605','code1606','code1607','code1608','code1609','code1610','code1611','code1612','code1613','code1614','code1615','code1616','code1617','code1618','code1619','code1620','code1621','code1622','code1623','code1624','code1625','code1626','code1627','code1628','code1629','code1630','code1631','code1632','code1633','code1634','code1635','code1636','code1637','code1638','code1639','code1640','code1641','code1642','code1643','code1644','code1645','code1646','code1647','code1648','code1649','code1650','code1651','code1652','code1653','code1654','code1655','code1656','code1657','code1658','code1659','code1660','code1661','code1662','code1663','code1664','code1665','code1666','code1667','code1668','code1669','code1670','code1671','code1672','code1673','code1674','code1675','code1676','code1677','code1678','code1679','code1680','code1681','code1682','code1683','code1684','code1685','code1686','code1687','code1688','code1689','code1690','code1691','code1692','code1693','code1694','code1695','code1696','code1697','code1698','code1699','code1700','code1701','code1702','code1703','code1704','code1705','code1706','code1707','code1708','code1709','code1710','code1711','code1712','code1713','code1714','code1715','code1716','code1717','code1718','code1719','code1720','code1721','code1722','code1723','code1724','code1725','code1726','code1727','code1728','code1729','code1730','code1731','code1732','code1733','code1734','code1735','code1736','code1737','code1738','code1739','code1740','code1741','code1742','code1743','code1744','code1745','code1746','code1747','code1748','code1749','code1750','code1751','code1752','code1753','code1754','code1755','code1756','code1757','code1758','code1759','code1760','code1761','code1762','code1763','code1764','code1765','code1766','code1767','code1768','code1769','code1770','code1771','code1772','code1773','code1774','code1775','code1776','code1777','code1778','code1779','code1780','code1781','code1782','code1783','code1784','code1785','code1786','code1787','code1788','code1789','code1790','code1791','code1792','code1793','code1794','code1795','code1796','code1797','code1798','code1799','code1800','code1801','code1802','code1803','code1804','code1805','code1806','code1807','code1808','code1809','code1810','code1811','code1812','code1813','code1814','code1815','code1816','code1817','code1818','code1819','code1820','code1821','code1822','code1823','code1824','code1825','code1826','code1827','code1828','code1829','code1830','code1831','code1832','code1833','code1834','code1835','code1836','code1837','code1838','code1839','code1840','code1841','code1842','code1843','code1844','code1845','code1846','code1847','code1848','code1849','code1850','code1851','code1852','code1853','code1854','code1855','code1856','code1857','code1858','code1859','code1860','code1861','code1862','code1863','code1864','code1865','code1866','code1867','code1868','code1869','code1870','code1871','code1872','code1873','code1874','code1875','code1876','code1877','code1878','code1879','code1880','code1881','code1882','code1883','code1884','code1885','code1886','code1887','code1888','code1889','code1890','code1891','code1892','code1893','code1894','code1895','code1896','code1897','code1898','code1899','code1900','code1901','code1902','code1903','code1904','code1905','code1906','code1907','code1908','code1909','code1910','code1911','code1912','code1913','code1914','code1915','code1916','code1917','code1918','code1919','code1920','code1921','code1922','code1923','code1924','code1925','code1926','code1927','code1928','code1929','code1930','code1931','code1932','code1933','code1934','code1935','code1936','code1937','code1938','code1939','code1940','code1941','code1942','code1943','code1944','code1945','code1946','code1947','code1948','code1949','code1950','code1951','code1952','code1953','code1954','code1955','code1956','code1957','code1958','code1959','code1960','code1961','code1962','code1963','code1964','code1965','code1966','code1967','code1968','code1969','code1970','code1971','code1972','code1973','code1974','code1975','code1976','code1977','code1978','code1979','code1980','code1981','code1982','code1983','code1984','code1985','code1986','code1987','code1988','code1989','code1990','code1991','code1992','code1993','code1994','code1995','code1996','code1997','code1998','code1999')", multiin);
        }
        class WhereItems01
        {
            public int id { get; set; }
            public string code { get; set; }
        }

        [Fact]
        public void WhereObjectInSplitOr()
        {
            var commonUtils = (g.sqlite.Select<WhereObject01>() as Select0Provider)._commonUtils;

            var tb = commonUtils.GetTableByEntity(typeof(WhereObject01));
            Assert.Equal("a.\"id\" = 1", commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 1).Select(a => new WhereObject01 { id = a })));
            Assert.Equal("a.\"id\" IN (1,2)", commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 2).Select(a => new WhereObject01 { id = a })));
            Assert.Equal("a.\"id\" IN (1,2,3,4,5,6,7,8,9,10)", commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 10).Select(a => new WhereObject01 { id = a })));
            var multiin = commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 1999).Select(a => new WhereObject01 { id = a }));
            Assert.Equal("a.\"id\" IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500) OR a.\"id\" IN (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000) OR a.\"id\" IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500) OR a.\"id\" IN (1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999)", multiin);

            tb = commonUtils.GetTableByEntity(typeof(WhereObject01));
            Assert.Equal("\"id\" = 1", commonUtils.WhereObject(tb, null, Enumerable.Range(1, 1).Select(a => new WhereObject01 { id = a })));
            Assert.Equal("\"id\" IN (1,2)", commonUtils.WhereObject(tb, null, Enumerable.Range(1, 2).Select(a => new WhereObject01 { id = a })));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10)", commonUtils.WhereObject(tb, null, Enumerable.Range(1, 10).Select(a => new WhereObject01 { id = a })));
            multiin = commonUtils.WhereObject(tb, null, Enumerable.Range(1, 1999).Select(a => new WhereObject01 { id = a }));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500) OR \"id\" IN (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000) OR \"id\" IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500) OR \"id\" IN (1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999)", multiin);

            tb = commonUtils.GetTableByEntity(typeof(WhereObject01));
            Assert.Equal("\"id\" = 1", commonUtils.WhereObject(tb, "", Enumerable.Range(1, 1).Select(a => new WhereObject01 { id = a })));
            Assert.Equal("\"id\" IN (1,2)", commonUtils.WhereObject(tb, "", Enumerable.Range(1, 2).Select(a => new WhereObject01 { id = a })));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10)", commonUtils.WhereObject(tb, "", Enumerable.Range(1, 10).Select(a => new WhereObject01 { id = a })));
            multiin = commonUtils.WhereObject(tb, "", Enumerable.Range(1, 1999).Select(a => new WhereObject01 { id = a }));
            Assert.Equal("\"id\" IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500) OR \"id\" IN (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000) OR \"id\" IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500) OR \"id\" IN (1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999)", multiin);


            tb = commonUtils.GetTableByEntity(typeof(WhereObject02));
            Assert.Equal("a.\"code\" = 'code1'", commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 1).Select(a => new WhereObject02 { code = "code" + a })));
            Assert.Equal("a.\"code\" IN ('code1','code2')", commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 2).Select(a => new WhereObject02 { code = "code" + a })));
            Assert.Equal("a.\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10')", commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 10).Select(a => new WhereObject02 { code = "code" + a })));
            multiin = commonUtils.WhereObject(tb, "a.", Enumerable.Range(1, 1999).Select(a => new WhereObject02 { code = "code" + a }));
            Assert.Equal("a.\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10','code11','code12','code13','code14','code15','code16','code17','code18','code19','code20','code21','code22','code23','code24','code25','code26','code27','code28','code29','code30','code31','code32','code33','code34','code35','code36','code37','code38','code39','code40','code41','code42','code43','code44','code45','code46','code47','code48','code49','code50','code51','code52','code53','code54','code55','code56','code57','code58','code59','code60','code61','code62','code63','code64','code65','code66','code67','code68','code69','code70','code71','code72','code73','code74','code75','code76','code77','code78','code79','code80','code81','code82','code83','code84','code85','code86','code87','code88','code89','code90','code91','code92','code93','code94','code95','code96','code97','code98','code99','code100','code101','code102','code103','code104','code105','code106','code107','code108','code109','code110','code111','code112','code113','code114','code115','code116','code117','code118','code119','code120','code121','code122','code123','code124','code125','code126','code127','code128','code129','code130','code131','code132','code133','code134','code135','code136','code137','code138','code139','code140','code141','code142','code143','code144','code145','code146','code147','code148','code149','code150','code151','code152','code153','code154','code155','code156','code157','code158','code159','code160','code161','code162','code163','code164','code165','code166','code167','code168','code169','code170','code171','code172','code173','code174','code175','code176','code177','code178','code179','code180','code181','code182','code183','code184','code185','code186','code187','code188','code189','code190','code191','code192','code193','code194','code195','code196','code197','code198','code199','code200','code201','code202','code203','code204','code205','code206','code207','code208','code209','code210','code211','code212','code213','code214','code215','code216','code217','code218','code219','code220','code221','code222','code223','code224','code225','code226','code227','code228','code229','code230','code231','code232','code233','code234','code235','code236','code237','code238','code239','code240','code241','code242','code243','code244','code245','code246','code247','code248','code249','code250','code251','code252','code253','code254','code255','code256','code257','code258','code259','code260','code261','code262','code263','code264','code265','code266','code267','code268','code269','code270','code271','code272','code273','code274','code275','code276','code277','code278','code279','code280','code281','code282','code283','code284','code285','code286','code287','code288','code289','code290','code291','code292','code293','code294','code295','code296','code297','code298','code299','code300','code301','code302','code303','code304','code305','code306','code307','code308','code309','code310','code311','code312','code313','code314','code315','code316','code317','code318','code319','code320','code321','code322','code323','code324','code325','code326','code327','code328','code329','code330','code331','code332','code333','code334','code335','code336','code337','code338','code339','code340','code341','code342','code343','code344','code345','code346','code347','code348','code349','code350','code351','code352','code353','code354','code355','code356','code357','code358','code359','code360','code361','code362','code363','code364','code365','code366','code367','code368','code369','code370','code371','code372','code373','code374','code375','code376','code377','code378','code379','code380','code381','code382','code383','code384','code385','code386','code387','code388','code389','code390','code391','code392','code393','code394','code395','code396','code397','code398','code399','code400','code401','code402','code403','code404','code405','code406','code407','code408','code409','code410','code411','code412','code413','code414','code415','code416','code417','code418','code419','code420','code421','code422','code423','code424','code425','code426','code427','code428','code429','code430','code431','code432','code433','code434','code435','code436','code437','code438','code439','code440','code441','code442','code443','code444','code445','code446','code447','code448','code449','code450','code451','code452','code453','code454','code455','code456','code457','code458','code459','code460','code461','code462','code463','code464','code465','code466','code467','code468','code469','code470','code471','code472','code473','code474','code475','code476','code477','code478','code479','code480','code481','code482','code483','code484','code485','code486','code487','code488','code489','code490','code491','code492','code493','code494','code495','code496','code497','code498','code499','code500') OR a.\"code\" IN ('code501','code502','code503','code504','code505','code506','code507','code508','code509','code510','code511','code512','code513','code514','code515','code516','code517','code518','code519','code520','code521','code522','code523','code524','code525','code526','code527','code528','code529','code530','code531','code532','code533','code534','code535','code536','code537','code538','code539','code540','code541','code542','code543','code544','code545','code546','code547','code548','code549','code550','code551','code552','code553','code554','code555','code556','code557','code558','code559','code560','code561','code562','code563','code564','code565','code566','code567','code568','code569','code570','code571','code572','code573','code574','code575','code576','code577','code578','code579','code580','code581','code582','code583','code584','code585','code586','code587','code588','code589','code590','code591','code592','code593','code594','code595','code596','code597','code598','code599','code600','code601','code602','code603','code604','code605','code606','code607','code608','code609','code610','code611','code612','code613','code614','code615','code616','code617','code618','code619','code620','code621','code622','code623','code624','code625','code626','code627','code628','code629','code630','code631','code632','code633','code634','code635','code636','code637','code638','code639','code640','code641','code642','code643','code644','code645','code646','code647','code648','code649','code650','code651','code652','code653','code654','code655','code656','code657','code658','code659','code660','code661','code662','code663','code664','code665','code666','code667','code668','code669','code670','code671','code672','code673','code674','code675','code676','code677','code678','code679','code680','code681','code682','code683','code684','code685','code686','code687','code688','code689','code690','code691','code692','code693','code694','code695','code696','code697','code698','code699','code700','code701','code702','code703','code704','code705','code706','code707','code708','code709','code710','code711','code712','code713','code714','code715','code716','code717','code718','code719','code720','code721','code722','code723','code724','code725','code726','code727','code728','code729','code730','code731','code732','code733','code734','code735','code736','code737','code738','code739','code740','code741','code742','code743','code744','code745','code746','code747','code748','code749','code750','code751','code752','code753','code754','code755','code756','code757','code758','code759','code760','code761','code762','code763','code764','code765','code766','code767','code768','code769','code770','code771','code772','code773','code774','code775','code776','code777','code778','code779','code780','code781','code782','code783','code784','code785','code786','code787','code788','code789','code790','code791','code792','code793','code794','code795','code796','code797','code798','code799','code800','code801','code802','code803','code804','code805','code806','code807','code808','code809','code810','code811','code812','code813','code814','code815','code816','code817','code818','code819','code820','code821','code822','code823','code824','code825','code826','code827','code828','code829','code830','code831','code832','code833','code834','code835','code836','code837','code838','code839','code840','code841','code842','code843','code844','code845','code846','code847','code848','code849','code850','code851','code852','code853','code854','code855','code856','code857','code858','code859','code860','code861','code862','code863','code864','code865','code866','code867','code868','code869','code870','code871','code872','code873','code874','code875','code876','code877','code878','code879','code880','code881','code882','code883','code884','code885','code886','code887','code888','code889','code890','code891','code892','code893','code894','code895','code896','code897','code898','code899','code900','code901','code902','code903','code904','code905','code906','code907','code908','code909','code910','code911','code912','code913','code914','code915','code916','code917','code918','code919','code920','code921','code922','code923','code924','code925','code926','code927','code928','code929','code930','code931','code932','code933','code934','code935','code936','code937','code938','code939','code940','code941','code942','code943','code944','code945','code946','code947','code948','code949','code950','code951','code952','code953','code954','code955','code956','code957','code958','code959','code960','code961','code962','code963','code964','code965','code966','code967','code968','code969','code970','code971','code972','code973','code974','code975','code976','code977','code978','code979','code980','code981','code982','code983','code984','code985','code986','code987','code988','code989','code990','code991','code992','code993','code994','code995','code996','code997','code998','code999','code1000') OR a.\"code\" IN ('code1001','code1002','code1003','code1004','code1005','code1006','code1007','code1008','code1009','code1010','code1011','code1012','code1013','code1014','code1015','code1016','code1017','code1018','code1019','code1020','code1021','code1022','code1023','code1024','code1025','code1026','code1027','code1028','code1029','code1030','code1031','code1032','code1033','code1034','code1035','code1036','code1037','code1038','code1039','code1040','code1041','code1042','code1043','code1044','code1045','code1046','code1047','code1048','code1049','code1050','code1051','code1052','code1053','code1054','code1055','code1056','code1057','code1058','code1059','code1060','code1061','code1062','code1063','code1064','code1065','code1066','code1067','code1068','code1069','code1070','code1071','code1072','code1073','code1074','code1075','code1076','code1077','code1078','code1079','code1080','code1081','code1082','code1083','code1084','code1085','code1086','code1087','code1088','code1089','code1090','code1091','code1092','code1093','code1094','code1095','code1096','code1097','code1098','code1099','code1100','code1101','code1102','code1103','code1104','code1105','code1106','code1107','code1108','code1109','code1110','code1111','code1112','code1113','code1114','code1115','code1116','code1117','code1118','code1119','code1120','code1121','code1122','code1123','code1124','code1125','code1126','code1127','code1128','code1129','code1130','code1131','code1132','code1133','code1134','code1135','code1136','code1137','code1138','code1139','code1140','code1141','code1142','code1143','code1144','code1145','code1146','code1147','code1148','code1149','code1150','code1151','code1152','code1153','code1154','code1155','code1156','code1157','code1158','code1159','code1160','code1161','code1162','code1163','code1164','code1165','code1166','code1167','code1168','code1169','code1170','code1171','code1172','code1173','code1174','code1175','code1176','code1177','code1178','code1179','code1180','code1181','code1182','code1183','code1184','code1185','code1186','code1187','code1188','code1189','code1190','code1191','code1192','code1193','code1194','code1195','code1196','code1197','code1198','code1199','code1200','code1201','code1202','code1203','code1204','code1205','code1206','code1207','code1208','code1209','code1210','code1211','code1212','code1213','code1214','code1215','code1216','code1217','code1218','code1219','code1220','code1221','code1222','code1223','code1224','code1225','code1226','code1227','code1228','code1229','code1230','code1231','code1232','code1233','code1234','code1235','code1236','code1237','code1238','code1239','code1240','code1241','code1242','code1243','code1244','code1245','code1246','code1247','code1248','code1249','code1250','code1251','code1252','code1253','code1254','code1255','code1256','code1257','code1258','code1259','code1260','code1261','code1262','code1263','code1264','code1265','code1266','code1267','code1268','code1269','code1270','code1271','code1272','code1273','code1274','code1275','code1276','code1277','code1278','code1279','code1280','code1281','code1282','code1283','code1284','code1285','code1286','code1287','code1288','code1289','code1290','code1291','code1292','code1293','code1294','code1295','code1296','code1297','code1298','code1299','code1300','code1301','code1302','code1303','code1304','code1305','code1306','code1307','code1308','code1309','code1310','code1311','code1312','code1313','code1314','code1315','code1316','code1317','code1318','code1319','code1320','code1321','code1322','code1323','code1324','code1325','code1326','code1327','code1328','code1329','code1330','code1331','code1332','code1333','code1334','code1335','code1336','code1337','code1338','code1339','code1340','code1341','code1342','code1343','code1344','code1345','code1346','code1347','code1348','code1349','code1350','code1351','code1352','code1353','code1354','code1355','code1356','code1357','code1358','code1359','code1360','code1361','code1362','code1363','code1364','code1365','code1366','code1367','code1368','code1369','code1370','code1371','code1372','code1373','code1374','code1375','code1376','code1377','code1378','code1379','code1380','code1381','code1382','code1383','code1384','code1385','code1386','code1387','code1388','code1389','code1390','code1391','code1392','code1393','code1394','code1395','code1396','code1397','code1398','code1399','code1400','code1401','code1402','code1403','code1404','code1405','code1406','code1407','code1408','code1409','code1410','code1411','code1412','code1413','code1414','code1415','code1416','code1417','code1418','code1419','code1420','code1421','code1422','code1423','code1424','code1425','code1426','code1427','code1428','code1429','code1430','code1431','code1432','code1433','code1434','code1435','code1436','code1437','code1438','code1439','code1440','code1441','code1442','code1443','code1444','code1445','code1446','code1447','code1448','code1449','code1450','code1451','code1452','code1453','code1454','code1455','code1456','code1457','code1458','code1459','code1460','code1461','code1462','code1463','code1464','code1465','code1466','code1467','code1468','code1469','code1470','code1471','code1472','code1473','code1474','code1475','code1476','code1477','code1478','code1479','code1480','code1481','code1482','code1483','code1484','code1485','code1486','code1487','code1488','code1489','code1490','code1491','code1492','code1493','code1494','code1495','code1496','code1497','code1498','code1499','code1500') OR a.\"code\" IN ('code1501','code1502','code1503','code1504','code1505','code1506','code1507','code1508','code1509','code1510','code1511','code1512','code1513','code1514','code1515','code1516','code1517','code1518','code1519','code1520','code1521','code1522','code1523','code1524','code1525','code1526','code1527','code1528','code1529','code1530','code1531','code1532','code1533','code1534','code1535','code1536','code1537','code1538','code1539','code1540','code1541','code1542','code1543','code1544','code1545','code1546','code1547','code1548','code1549','code1550','code1551','code1552','code1553','code1554','code1555','code1556','code1557','code1558','code1559','code1560','code1561','code1562','code1563','code1564','code1565','code1566','code1567','code1568','code1569','code1570','code1571','code1572','code1573','code1574','code1575','code1576','code1577','code1578','code1579','code1580','code1581','code1582','code1583','code1584','code1585','code1586','code1587','code1588','code1589','code1590','code1591','code1592','code1593','code1594','code1595','code1596','code1597','code1598','code1599','code1600','code1601','code1602','code1603','code1604','code1605','code1606','code1607','code1608','code1609','code1610','code1611','code1612','code1613','code1614','code1615','code1616','code1617','code1618','code1619','code1620','code1621','code1622','code1623','code1624','code1625','code1626','code1627','code1628','code1629','code1630','code1631','code1632','code1633','code1634','code1635','code1636','code1637','code1638','code1639','code1640','code1641','code1642','code1643','code1644','code1645','code1646','code1647','code1648','code1649','code1650','code1651','code1652','code1653','code1654','code1655','code1656','code1657','code1658','code1659','code1660','code1661','code1662','code1663','code1664','code1665','code1666','code1667','code1668','code1669','code1670','code1671','code1672','code1673','code1674','code1675','code1676','code1677','code1678','code1679','code1680','code1681','code1682','code1683','code1684','code1685','code1686','code1687','code1688','code1689','code1690','code1691','code1692','code1693','code1694','code1695','code1696','code1697','code1698','code1699','code1700','code1701','code1702','code1703','code1704','code1705','code1706','code1707','code1708','code1709','code1710','code1711','code1712','code1713','code1714','code1715','code1716','code1717','code1718','code1719','code1720','code1721','code1722','code1723','code1724','code1725','code1726','code1727','code1728','code1729','code1730','code1731','code1732','code1733','code1734','code1735','code1736','code1737','code1738','code1739','code1740','code1741','code1742','code1743','code1744','code1745','code1746','code1747','code1748','code1749','code1750','code1751','code1752','code1753','code1754','code1755','code1756','code1757','code1758','code1759','code1760','code1761','code1762','code1763','code1764','code1765','code1766','code1767','code1768','code1769','code1770','code1771','code1772','code1773','code1774','code1775','code1776','code1777','code1778','code1779','code1780','code1781','code1782','code1783','code1784','code1785','code1786','code1787','code1788','code1789','code1790','code1791','code1792','code1793','code1794','code1795','code1796','code1797','code1798','code1799','code1800','code1801','code1802','code1803','code1804','code1805','code1806','code1807','code1808','code1809','code1810','code1811','code1812','code1813','code1814','code1815','code1816','code1817','code1818','code1819','code1820','code1821','code1822','code1823','code1824','code1825','code1826','code1827','code1828','code1829','code1830','code1831','code1832','code1833','code1834','code1835','code1836','code1837','code1838','code1839','code1840','code1841','code1842','code1843','code1844','code1845','code1846','code1847','code1848','code1849','code1850','code1851','code1852','code1853','code1854','code1855','code1856','code1857','code1858','code1859','code1860','code1861','code1862','code1863','code1864','code1865','code1866','code1867','code1868','code1869','code1870','code1871','code1872','code1873','code1874','code1875','code1876','code1877','code1878','code1879','code1880','code1881','code1882','code1883','code1884','code1885','code1886','code1887','code1888','code1889','code1890','code1891','code1892','code1893','code1894','code1895','code1896','code1897','code1898','code1899','code1900','code1901','code1902','code1903','code1904','code1905','code1906','code1907','code1908','code1909','code1910','code1911','code1912','code1913','code1914','code1915','code1916','code1917','code1918','code1919','code1920','code1921','code1922','code1923','code1924','code1925','code1926','code1927','code1928','code1929','code1930','code1931','code1932','code1933','code1934','code1935','code1936','code1937','code1938','code1939','code1940','code1941','code1942','code1943','code1944','code1945','code1946','code1947','code1948','code1949','code1950','code1951','code1952','code1953','code1954','code1955','code1956','code1957','code1958','code1959','code1960','code1961','code1962','code1963','code1964','code1965','code1966','code1967','code1968','code1969','code1970','code1971','code1972','code1973','code1974','code1975','code1976','code1977','code1978','code1979','code1980','code1981','code1982','code1983','code1984','code1985','code1986','code1987','code1988','code1989','code1990','code1991','code1992','code1993','code1994','code1995','code1996','code1997','code1998','code1999')", multiin);

            tb = commonUtils.GetTableByEntity(typeof(WhereObject02));
            Assert.Equal("\"code\" = 'code1'", commonUtils.WhereObject(tb, null, Enumerable.Range(1, 1).Select(a => new WhereObject02 { code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2')", commonUtils.WhereObject(tb, null, Enumerable.Range(1, 2).Select(a => new WhereObject02 { code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10')", commonUtils.WhereObject(tb, null, Enumerable.Range(1, 10).Select(a => new WhereObject02 { code = "code" + a })));
            multiin = commonUtils.WhereObject(tb, null, Enumerable.Range(1, 1999).Select(a => new WhereObject02 { code = "code" + a }));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10','code11','code12','code13','code14','code15','code16','code17','code18','code19','code20','code21','code22','code23','code24','code25','code26','code27','code28','code29','code30','code31','code32','code33','code34','code35','code36','code37','code38','code39','code40','code41','code42','code43','code44','code45','code46','code47','code48','code49','code50','code51','code52','code53','code54','code55','code56','code57','code58','code59','code60','code61','code62','code63','code64','code65','code66','code67','code68','code69','code70','code71','code72','code73','code74','code75','code76','code77','code78','code79','code80','code81','code82','code83','code84','code85','code86','code87','code88','code89','code90','code91','code92','code93','code94','code95','code96','code97','code98','code99','code100','code101','code102','code103','code104','code105','code106','code107','code108','code109','code110','code111','code112','code113','code114','code115','code116','code117','code118','code119','code120','code121','code122','code123','code124','code125','code126','code127','code128','code129','code130','code131','code132','code133','code134','code135','code136','code137','code138','code139','code140','code141','code142','code143','code144','code145','code146','code147','code148','code149','code150','code151','code152','code153','code154','code155','code156','code157','code158','code159','code160','code161','code162','code163','code164','code165','code166','code167','code168','code169','code170','code171','code172','code173','code174','code175','code176','code177','code178','code179','code180','code181','code182','code183','code184','code185','code186','code187','code188','code189','code190','code191','code192','code193','code194','code195','code196','code197','code198','code199','code200','code201','code202','code203','code204','code205','code206','code207','code208','code209','code210','code211','code212','code213','code214','code215','code216','code217','code218','code219','code220','code221','code222','code223','code224','code225','code226','code227','code228','code229','code230','code231','code232','code233','code234','code235','code236','code237','code238','code239','code240','code241','code242','code243','code244','code245','code246','code247','code248','code249','code250','code251','code252','code253','code254','code255','code256','code257','code258','code259','code260','code261','code262','code263','code264','code265','code266','code267','code268','code269','code270','code271','code272','code273','code274','code275','code276','code277','code278','code279','code280','code281','code282','code283','code284','code285','code286','code287','code288','code289','code290','code291','code292','code293','code294','code295','code296','code297','code298','code299','code300','code301','code302','code303','code304','code305','code306','code307','code308','code309','code310','code311','code312','code313','code314','code315','code316','code317','code318','code319','code320','code321','code322','code323','code324','code325','code326','code327','code328','code329','code330','code331','code332','code333','code334','code335','code336','code337','code338','code339','code340','code341','code342','code343','code344','code345','code346','code347','code348','code349','code350','code351','code352','code353','code354','code355','code356','code357','code358','code359','code360','code361','code362','code363','code364','code365','code366','code367','code368','code369','code370','code371','code372','code373','code374','code375','code376','code377','code378','code379','code380','code381','code382','code383','code384','code385','code386','code387','code388','code389','code390','code391','code392','code393','code394','code395','code396','code397','code398','code399','code400','code401','code402','code403','code404','code405','code406','code407','code408','code409','code410','code411','code412','code413','code414','code415','code416','code417','code418','code419','code420','code421','code422','code423','code424','code425','code426','code427','code428','code429','code430','code431','code432','code433','code434','code435','code436','code437','code438','code439','code440','code441','code442','code443','code444','code445','code446','code447','code448','code449','code450','code451','code452','code453','code454','code455','code456','code457','code458','code459','code460','code461','code462','code463','code464','code465','code466','code467','code468','code469','code470','code471','code472','code473','code474','code475','code476','code477','code478','code479','code480','code481','code482','code483','code484','code485','code486','code487','code488','code489','code490','code491','code492','code493','code494','code495','code496','code497','code498','code499','code500') OR \"code\" IN ('code501','code502','code503','code504','code505','code506','code507','code508','code509','code510','code511','code512','code513','code514','code515','code516','code517','code518','code519','code520','code521','code522','code523','code524','code525','code526','code527','code528','code529','code530','code531','code532','code533','code534','code535','code536','code537','code538','code539','code540','code541','code542','code543','code544','code545','code546','code547','code548','code549','code550','code551','code552','code553','code554','code555','code556','code557','code558','code559','code560','code561','code562','code563','code564','code565','code566','code567','code568','code569','code570','code571','code572','code573','code574','code575','code576','code577','code578','code579','code580','code581','code582','code583','code584','code585','code586','code587','code588','code589','code590','code591','code592','code593','code594','code595','code596','code597','code598','code599','code600','code601','code602','code603','code604','code605','code606','code607','code608','code609','code610','code611','code612','code613','code614','code615','code616','code617','code618','code619','code620','code621','code622','code623','code624','code625','code626','code627','code628','code629','code630','code631','code632','code633','code634','code635','code636','code637','code638','code639','code640','code641','code642','code643','code644','code645','code646','code647','code648','code649','code650','code651','code652','code653','code654','code655','code656','code657','code658','code659','code660','code661','code662','code663','code664','code665','code666','code667','code668','code669','code670','code671','code672','code673','code674','code675','code676','code677','code678','code679','code680','code681','code682','code683','code684','code685','code686','code687','code688','code689','code690','code691','code692','code693','code694','code695','code696','code697','code698','code699','code700','code701','code702','code703','code704','code705','code706','code707','code708','code709','code710','code711','code712','code713','code714','code715','code716','code717','code718','code719','code720','code721','code722','code723','code724','code725','code726','code727','code728','code729','code730','code731','code732','code733','code734','code735','code736','code737','code738','code739','code740','code741','code742','code743','code744','code745','code746','code747','code748','code749','code750','code751','code752','code753','code754','code755','code756','code757','code758','code759','code760','code761','code762','code763','code764','code765','code766','code767','code768','code769','code770','code771','code772','code773','code774','code775','code776','code777','code778','code779','code780','code781','code782','code783','code784','code785','code786','code787','code788','code789','code790','code791','code792','code793','code794','code795','code796','code797','code798','code799','code800','code801','code802','code803','code804','code805','code806','code807','code808','code809','code810','code811','code812','code813','code814','code815','code816','code817','code818','code819','code820','code821','code822','code823','code824','code825','code826','code827','code828','code829','code830','code831','code832','code833','code834','code835','code836','code837','code838','code839','code840','code841','code842','code843','code844','code845','code846','code847','code848','code849','code850','code851','code852','code853','code854','code855','code856','code857','code858','code859','code860','code861','code862','code863','code864','code865','code866','code867','code868','code869','code870','code871','code872','code873','code874','code875','code876','code877','code878','code879','code880','code881','code882','code883','code884','code885','code886','code887','code888','code889','code890','code891','code892','code893','code894','code895','code896','code897','code898','code899','code900','code901','code902','code903','code904','code905','code906','code907','code908','code909','code910','code911','code912','code913','code914','code915','code916','code917','code918','code919','code920','code921','code922','code923','code924','code925','code926','code927','code928','code929','code930','code931','code932','code933','code934','code935','code936','code937','code938','code939','code940','code941','code942','code943','code944','code945','code946','code947','code948','code949','code950','code951','code952','code953','code954','code955','code956','code957','code958','code959','code960','code961','code962','code963','code964','code965','code966','code967','code968','code969','code970','code971','code972','code973','code974','code975','code976','code977','code978','code979','code980','code981','code982','code983','code984','code985','code986','code987','code988','code989','code990','code991','code992','code993','code994','code995','code996','code997','code998','code999','code1000') OR \"code\" IN ('code1001','code1002','code1003','code1004','code1005','code1006','code1007','code1008','code1009','code1010','code1011','code1012','code1013','code1014','code1015','code1016','code1017','code1018','code1019','code1020','code1021','code1022','code1023','code1024','code1025','code1026','code1027','code1028','code1029','code1030','code1031','code1032','code1033','code1034','code1035','code1036','code1037','code1038','code1039','code1040','code1041','code1042','code1043','code1044','code1045','code1046','code1047','code1048','code1049','code1050','code1051','code1052','code1053','code1054','code1055','code1056','code1057','code1058','code1059','code1060','code1061','code1062','code1063','code1064','code1065','code1066','code1067','code1068','code1069','code1070','code1071','code1072','code1073','code1074','code1075','code1076','code1077','code1078','code1079','code1080','code1081','code1082','code1083','code1084','code1085','code1086','code1087','code1088','code1089','code1090','code1091','code1092','code1093','code1094','code1095','code1096','code1097','code1098','code1099','code1100','code1101','code1102','code1103','code1104','code1105','code1106','code1107','code1108','code1109','code1110','code1111','code1112','code1113','code1114','code1115','code1116','code1117','code1118','code1119','code1120','code1121','code1122','code1123','code1124','code1125','code1126','code1127','code1128','code1129','code1130','code1131','code1132','code1133','code1134','code1135','code1136','code1137','code1138','code1139','code1140','code1141','code1142','code1143','code1144','code1145','code1146','code1147','code1148','code1149','code1150','code1151','code1152','code1153','code1154','code1155','code1156','code1157','code1158','code1159','code1160','code1161','code1162','code1163','code1164','code1165','code1166','code1167','code1168','code1169','code1170','code1171','code1172','code1173','code1174','code1175','code1176','code1177','code1178','code1179','code1180','code1181','code1182','code1183','code1184','code1185','code1186','code1187','code1188','code1189','code1190','code1191','code1192','code1193','code1194','code1195','code1196','code1197','code1198','code1199','code1200','code1201','code1202','code1203','code1204','code1205','code1206','code1207','code1208','code1209','code1210','code1211','code1212','code1213','code1214','code1215','code1216','code1217','code1218','code1219','code1220','code1221','code1222','code1223','code1224','code1225','code1226','code1227','code1228','code1229','code1230','code1231','code1232','code1233','code1234','code1235','code1236','code1237','code1238','code1239','code1240','code1241','code1242','code1243','code1244','code1245','code1246','code1247','code1248','code1249','code1250','code1251','code1252','code1253','code1254','code1255','code1256','code1257','code1258','code1259','code1260','code1261','code1262','code1263','code1264','code1265','code1266','code1267','code1268','code1269','code1270','code1271','code1272','code1273','code1274','code1275','code1276','code1277','code1278','code1279','code1280','code1281','code1282','code1283','code1284','code1285','code1286','code1287','code1288','code1289','code1290','code1291','code1292','code1293','code1294','code1295','code1296','code1297','code1298','code1299','code1300','code1301','code1302','code1303','code1304','code1305','code1306','code1307','code1308','code1309','code1310','code1311','code1312','code1313','code1314','code1315','code1316','code1317','code1318','code1319','code1320','code1321','code1322','code1323','code1324','code1325','code1326','code1327','code1328','code1329','code1330','code1331','code1332','code1333','code1334','code1335','code1336','code1337','code1338','code1339','code1340','code1341','code1342','code1343','code1344','code1345','code1346','code1347','code1348','code1349','code1350','code1351','code1352','code1353','code1354','code1355','code1356','code1357','code1358','code1359','code1360','code1361','code1362','code1363','code1364','code1365','code1366','code1367','code1368','code1369','code1370','code1371','code1372','code1373','code1374','code1375','code1376','code1377','code1378','code1379','code1380','code1381','code1382','code1383','code1384','code1385','code1386','code1387','code1388','code1389','code1390','code1391','code1392','code1393','code1394','code1395','code1396','code1397','code1398','code1399','code1400','code1401','code1402','code1403','code1404','code1405','code1406','code1407','code1408','code1409','code1410','code1411','code1412','code1413','code1414','code1415','code1416','code1417','code1418','code1419','code1420','code1421','code1422','code1423','code1424','code1425','code1426','code1427','code1428','code1429','code1430','code1431','code1432','code1433','code1434','code1435','code1436','code1437','code1438','code1439','code1440','code1441','code1442','code1443','code1444','code1445','code1446','code1447','code1448','code1449','code1450','code1451','code1452','code1453','code1454','code1455','code1456','code1457','code1458','code1459','code1460','code1461','code1462','code1463','code1464','code1465','code1466','code1467','code1468','code1469','code1470','code1471','code1472','code1473','code1474','code1475','code1476','code1477','code1478','code1479','code1480','code1481','code1482','code1483','code1484','code1485','code1486','code1487','code1488','code1489','code1490','code1491','code1492','code1493','code1494','code1495','code1496','code1497','code1498','code1499','code1500') OR \"code\" IN ('code1501','code1502','code1503','code1504','code1505','code1506','code1507','code1508','code1509','code1510','code1511','code1512','code1513','code1514','code1515','code1516','code1517','code1518','code1519','code1520','code1521','code1522','code1523','code1524','code1525','code1526','code1527','code1528','code1529','code1530','code1531','code1532','code1533','code1534','code1535','code1536','code1537','code1538','code1539','code1540','code1541','code1542','code1543','code1544','code1545','code1546','code1547','code1548','code1549','code1550','code1551','code1552','code1553','code1554','code1555','code1556','code1557','code1558','code1559','code1560','code1561','code1562','code1563','code1564','code1565','code1566','code1567','code1568','code1569','code1570','code1571','code1572','code1573','code1574','code1575','code1576','code1577','code1578','code1579','code1580','code1581','code1582','code1583','code1584','code1585','code1586','code1587','code1588','code1589','code1590','code1591','code1592','code1593','code1594','code1595','code1596','code1597','code1598','code1599','code1600','code1601','code1602','code1603','code1604','code1605','code1606','code1607','code1608','code1609','code1610','code1611','code1612','code1613','code1614','code1615','code1616','code1617','code1618','code1619','code1620','code1621','code1622','code1623','code1624','code1625','code1626','code1627','code1628','code1629','code1630','code1631','code1632','code1633','code1634','code1635','code1636','code1637','code1638','code1639','code1640','code1641','code1642','code1643','code1644','code1645','code1646','code1647','code1648','code1649','code1650','code1651','code1652','code1653','code1654','code1655','code1656','code1657','code1658','code1659','code1660','code1661','code1662','code1663','code1664','code1665','code1666','code1667','code1668','code1669','code1670','code1671','code1672','code1673','code1674','code1675','code1676','code1677','code1678','code1679','code1680','code1681','code1682','code1683','code1684','code1685','code1686','code1687','code1688','code1689','code1690','code1691','code1692','code1693','code1694','code1695','code1696','code1697','code1698','code1699','code1700','code1701','code1702','code1703','code1704','code1705','code1706','code1707','code1708','code1709','code1710','code1711','code1712','code1713','code1714','code1715','code1716','code1717','code1718','code1719','code1720','code1721','code1722','code1723','code1724','code1725','code1726','code1727','code1728','code1729','code1730','code1731','code1732','code1733','code1734','code1735','code1736','code1737','code1738','code1739','code1740','code1741','code1742','code1743','code1744','code1745','code1746','code1747','code1748','code1749','code1750','code1751','code1752','code1753','code1754','code1755','code1756','code1757','code1758','code1759','code1760','code1761','code1762','code1763','code1764','code1765','code1766','code1767','code1768','code1769','code1770','code1771','code1772','code1773','code1774','code1775','code1776','code1777','code1778','code1779','code1780','code1781','code1782','code1783','code1784','code1785','code1786','code1787','code1788','code1789','code1790','code1791','code1792','code1793','code1794','code1795','code1796','code1797','code1798','code1799','code1800','code1801','code1802','code1803','code1804','code1805','code1806','code1807','code1808','code1809','code1810','code1811','code1812','code1813','code1814','code1815','code1816','code1817','code1818','code1819','code1820','code1821','code1822','code1823','code1824','code1825','code1826','code1827','code1828','code1829','code1830','code1831','code1832','code1833','code1834','code1835','code1836','code1837','code1838','code1839','code1840','code1841','code1842','code1843','code1844','code1845','code1846','code1847','code1848','code1849','code1850','code1851','code1852','code1853','code1854','code1855','code1856','code1857','code1858','code1859','code1860','code1861','code1862','code1863','code1864','code1865','code1866','code1867','code1868','code1869','code1870','code1871','code1872','code1873','code1874','code1875','code1876','code1877','code1878','code1879','code1880','code1881','code1882','code1883','code1884','code1885','code1886','code1887','code1888','code1889','code1890','code1891','code1892','code1893','code1894','code1895','code1896','code1897','code1898','code1899','code1900','code1901','code1902','code1903','code1904','code1905','code1906','code1907','code1908','code1909','code1910','code1911','code1912','code1913','code1914','code1915','code1916','code1917','code1918','code1919','code1920','code1921','code1922','code1923','code1924','code1925','code1926','code1927','code1928','code1929','code1930','code1931','code1932','code1933','code1934','code1935','code1936','code1937','code1938','code1939','code1940','code1941','code1942','code1943','code1944','code1945','code1946','code1947','code1948','code1949','code1950','code1951','code1952','code1953','code1954','code1955','code1956','code1957','code1958','code1959','code1960','code1961','code1962','code1963','code1964','code1965','code1966','code1967','code1968','code1969','code1970','code1971','code1972','code1973','code1974','code1975','code1976','code1977','code1978','code1979','code1980','code1981','code1982','code1983','code1984','code1985','code1986','code1987','code1988','code1989','code1990','code1991','code1992','code1993','code1994','code1995','code1996','code1997','code1998','code1999')", multiin);

            tb = commonUtils.GetTableByEntity(typeof(WhereObject02));
            Assert.Equal("\"code\" = 'code1'", commonUtils.WhereObject(tb, "", Enumerable.Range(1, 1).Select(a => new WhereObject02 { code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2')", commonUtils.WhereObject(tb, "", Enumerable.Range(1, 2).Select(a => new WhereObject02 { code = "code" + a })));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10')", commonUtils.WhereObject(tb, "", Enumerable.Range(1, 10).Select(a => new WhereObject02 { code = "code" + a })));
            multiin = commonUtils.WhereObject(tb, "", Enumerable.Range(1, 1999).Select(a => new WhereObject02 { code = "code" + a }));
            Assert.Equal("\"code\" IN ('code1','code2','code3','code4','code5','code6','code7','code8','code9','code10','code11','code12','code13','code14','code15','code16','code17','code18','code19','code20','code21','code22','code23','code24','code25','code26','code27','code28','code29','code30','code31','code32','code33','code34','code35','code36','code37','code38','code39','code40','code41','code42','code43','code44','code45','code46','code47','code48','code49','code50','code51','code52','code53','code54','code55','code56','code57','code58','code59','code60','code61','code62','code63','code64','code65','code66','code67','code68','code69','code70','code71','code72','code73','code74','code75','code76','code77','code78','code79','code80','code81','code82','code83','code84','code85','code86','code87','code88','code89','code90','code91','code92','code93','code94','code95','code96','code97','code98','code99','code100','code101','code102','code103','code104','code105','code106','code107','code108','code109','code110','code111','code112','code113','code114','code115','code116','code117','code118','code119','code120','code121','code122','code123','code124','code125','code126','code127','code128','code129','code130','code131','code132','code133','code134','code135','code136','code137','code138','code139','code140','code141','code142','code143','code144','code145','code146','code147','code148','code149','code150','code151','code152','code153','code154','code155','code156','code157','code158','code159','code160','code161','code162','code163','code164','code165','code166','code167','code168','code169','code170','code171','code172','code173','code174','code175','code176','code177','code178','code179','code180','code181','code182','code183','code184','code185','code186','code187','code188','code189','code190','code191','code192','code193','code194','code195','code196','code197','code198','code199','code200','code201','code202','code203','code204','code205','code206','code207','code208','code209','code210','code211','code212','code213','code214','code215','code216','code217','code218','code219','code220','code221','code222','code223','code224','code225','code226','code227','code228','code229','code230','code231','code232','code233','code234','code235','code236','code237','code238','code239','code240','code241','code242','code243','code244','code245','code246','code247','code248','code249','code250','code251','code252','code253','code254','code255','code256','code257','code258','code259','code260','code261','code262','code263','code264','code265','code266','code267','code268','code269','code270','code271','code272','code273','code274','code275','code276','code277','code278','code279','code280','code281','code282','code283','code284','code285','code286','code287','code288','code289','code290','code291','code292','code293','code294','code295','code296','code297','code298','code299','code300','code301','code302','code303','code304','code305','code306','code307','code308','code309','code310','code311','code312','code313','code314','code315','code316','code317','code318','code319','code320','code321','code322','code323','code324','code325','code326','code327','code328','code329','code330','code331','code332','code333','code334','code335','code336','code337','code338','code339','code340','code341','code342','code343','code344','code345','code346','code347','code348','code349','code350','code351','code352','code353','code354','code355','code356','code357','code358','code359','code360','code361','code362','code363','code364','code365','code366','code367','code368','code369','code370','code371','code372','code373','code374','code375','code376','code377','code378','code379','code380','code381','code382','code383','code384','code385','code386','code387','code388','code389','code390','code391','code392','code393','code394','code395','code396','code397','code398','code399','code400','code401','code402','code403','code404','code405','code406','code407','code408','code409','code410','code411','code412','code413','code414','code415','code416','code417','code418','code419','code420','code421','code422','code423','code424','code425','code426','code427','code428','code429','code430','code431','code432','code433','code434','code435','code436','code437','code438','code439','code440','code441','code442','code443','code444','code445','code446','code447','code448','code449','code450','code451','code452','code453','code454','code455','code456','code457','code458','code459','code460','code461','code462','code463','code464','code465','code466','code467','code468','code469','code470','code471','code472','code473','code474','code475','code476','code477','code478','code479','code480','code481','code482','code483','code484','code485','code486','code487','code488','code489','code490','code491','code492','code493','code494','code495','code496','code497','code498','code499','code500') OR \"code\" IN ('code501','code502','code503','code504','code505','code506','code507','code508','code509','code510','code511','code512','code513','code514','code515','code516','code517','code518','code519','code520','code521','code522','code523','code524','code525','code526','code527','code528','code529','code530','code531','code532','code533','code534','code535','code536','code537','code538','code539','code540','code541','code542','code543','code544','code545','code546','code547','code548','code549','code550','code551','code552','code553','code554','code555','code556','code557','code558','code559','code560','code561','code562','code563','code564','code565','code566','code567','code568','code569','code570','code571','code572','code573','code574','code575','code576','code577','code578','code579','code580','code581','code582','code583','code584','code585','code586','code587','code588','code589','code590','code591','code592','code593','code594','code595','code596','code597','code598','code599','code600','code601','code602','code603','code604','code605','code606','code607','code608','code609','code610','code611','code612','code613','code614','code615','code616','code617','code618','code619','code620','code621','code622','code623','code624','code625','code626','code627','code628','code629','code630','code631','code632','code633','code634','code635','code636','code637','code638','code639','code640','code641','code642','code643','code644','code645','code646','code647','code648','code649','code650','code651','code652','code653','code654','code655','code656','code657','code658','code659','code660','code661','code662','code663','code664','code665','code666','code667','code668','code669','code670','code671','code672','code673','code674','code675','code676','code677','code678','code679','code680','code681','code682','code683','code684','code685','code686','code687','code688','code689','code690','code691','code692','code693','code694','code695','code696','code697','code698','code699','code700','code701','code702','code703','code704','code705','code706','code707','code708','code709','code710','code711','code712','code713','code714','code715','code716','code717','code718','code719','code720','code721','code722','code723','code724','code725','code726','code727','code728','code729','code730','code731','code732','code733','code734','code735','code736','code737','code738','code739','code740','code741','code742','code743','code744','code745','code746','code747','code748','code749','code750','code751','code752','code753','code754','code755','code756','code757','code758','code759','code760','code761','code762','code763','code764','code765','code766','code767','code768','code769','code770','code771','code772','code773','code774','code775','code776','code777','code778','code779','code780','code781','code782','code783','code784','code785','code786','code787','code788','code789','code790','code791','code792','code793','code794','code795','code796','code797','code798','code799','code800','code801','code802','code803','code804','code805','code806','code807','code808','code809','code810','code811','code812','code813','code814','code815','code816','code817','code818','code819','code820','code821','code822','code823','code824','code825','code826','code827','code828','code829','code830','code831','code832','code833','code834','code835','code836','code837','code838','code839','code840','code841','code842','code843','code844','code845','code846','code847','code848','code849','code850','code851','code852','code853','code854','code855','code856','code857','code858','code859','code860','code861','code862','code863','code864','code865','code866','code867','code868','code869','code870','code871','code872','code873','code874','code875','code876','code877','code878','code879','code880','code881','code882','code883','code884','code885','code886','code887','code888','code889','code890','code891','code892','code893','code894','code895','code896','code897','code898','code899','code900','code901','code902','code903','code904','code905','code906','code907','code908','code909','code910','code911','code912','code913','code914','code915','code916','code917','code918','code919','code920','code921','code922','code923','code924','code925','code926','code927','code928','code929','code930','code931','code932','code933','code934','code935','code936','code937','code938','code939','code940','code941','code942','code943','code944','code945','code946','code947','code948','code949','code950','code951','code952','code953','code954','code955','code956','code957','code958','code959','code960','code961','code962','code963','code964','code965','code966','code967','code968','code969','code970','code971','code972','code973','code974','code975','code976','code977','code978','code979','code980','code981','code982','code983','code984','code985','code986','code987','code988','code989','code990','code991','code992','code993','code994','code995','code996','code997','code998','code999','code1000') OR \"code\" IN ('code1001','code1002','code1003','code1004','code1005','code1006','code1007','code1008','code1009','code1010','code1011','code1012','code1013','code1014','code1015','code1016','code1017','code1018','code1019','code1020','code1021','code1022','code1023','code1024','code1025','code1026','code1027','code1028','code1029','code1030','code1031','code1032','code1033','code1034','code1035','code1036','code1037','code1038','code1039','code1040','code1041','code1042','code1043','code1044','code1045','code1046','code1047','code1048','code1049','code1050','code1051','code1052','code1053','code1054','code1055','code1056','code1057','code1058','code1059','code1060','code1061','code1062','code1063','code1064','code1065','code1066','code1067','code1068','code1069','code1070','code1071','code1072','code1073','code1074','code1075','code1076','code1077','code1078','code1079','code1080','code1081','code1082','code1083','code1084','code1085','code1086','code1087','code1088','code1089','code1090','code1091','code1092','code1093','code1094','code1095','code1096','code1097','code1098','code1099','code1100','code1101','code1102','code1103','code1104','code1105','code1106','code1107','code1108','code1109','code1110','code1111','code1112','code1113','code1114','code1115','code1116','code1117','code1118','code1119','code1120','code1121','code1122','code1123','code1124','code1125','code1126','code1127','code1128','code1129','code1130','code1131','code1132','code1133','code1134','code1135','code1136','code1137','code1138','code1139','code1140','code1141','code1142','code1143','code1144','code1145','code1146','code1147','code1148','code1149','code1150','code1151','code1152','code1153','code1154','code1155','code1156','code1157','code1158','code1159','code1160','code1161','code1162','code1163','code1164','code1165','code1166','code1167','code1168','code1169','code1170','code1171','code1172','code1173','code1174','code1175','code1176','code1177','code1178','code1179','code1180','code1181','code1182','code1183','code1184','code1185','code1186','code1187','code1188','code1189','code1190','code1191','code1192','code1193','code1194','code1195','code1196','code1197','code1198','code1199','code1200','code1201','code1202','code1203','code1204','code1205','code1206','code1207','code1208','code1209','code1210','code1211','code1212','code1213','code1214','code1215','code1216','code1217','code1218','code1219','code1220','code1221','code1222','code1223','code1224','code1225','code1226','code1227','code1228','code1229','code1230','code1231','code1232','code1233','code1234','code1235','code1236','code1237','code1238','code1239','code1240','code1241','code1242','code1243','code1244','code1245','code1246','code1247','code1248','code1249','code1250','code1251','code1252','code1253','code1254','code1255','code1256','code1257','code1258','code1259','code1260','code1261','code1262','code1263','code1264','code1265','code1266','code1267','code1268','code1269','code1270','code1271','code1272','code1273','code1274','code1275','code1276','code1277','code1278','code1279','code1280','code1281','code1282','code1283','code1284','code1285','code1286','code1287','code1288','code1289','code1290','code1291','code1292','code1293','code1294','code1295','code1296','code1297','code1298','code1299','code1300','code1301','code1302','code1303','code1304','code1305','code1306','code1307','code1308','code1309','code1310','code1311','code1312','code1313','code1314','code1315','code1316','code1317','code1318','code1319','code1320','code1321','code1322','code1323','code1324','code1325','code1326','code1327','code1328','code1329','code1330','code1331','code1332','code1333','code1334','code1335','code1336','code1337','code1338','code1339','code1340','code1341','code1342','code1343','code1344','code1345','code1346','code1347','code1348','code1349','code1350','code1351','code1352','code1353','code1354','code1355','code1356','code1357','code1358','code1359','code1360','code1361','code1362','code1363','code1364','code1365','code1366','code1367','code1368','code1369','code1370','code1371','code1372','code1373','code1374','code1375','code1376','code1377','code1378','code1379','code1380','code1381','code1382','code1383','code1384','code1385','code1386','code1387','code1388','code1389','code1390','code1391','code1392','code1393','code1394','code1395','code1396','code1397','code1398','code1399','code1400','code1401','code1402','code1403','code1404','code1405','code1406','code1407','code1408','code1409','code1410','code1411','code1412','code1413','code1414','code1415','code1416','code1417','code1418','code1419','code1420','code1421','code1422','code1423','code1424','code1425','code1426','code1427','code1428','code1429','code1430','code1431','code1432','code1433','code1434','code1435','code1436','code1437','code1438','code1439','code1440','code1441','code1442','code1443','code1444','code1445','code1446','code1447','code1448','code1449','code1450','code1451','code1452','code1453','code1454','code1455','code1456','code1457','code1458','code1459','code1460','code1461','code1462','code1463','code1464','code1465','code1466','code1467','code1468','code1469','code1470','code1471','code1472','code1473','code1474','code1475','code1476','code1477','code1478','code1479','code1480','code1481','code1482','code1483','code1484','code1485','code1486','code1487','code1488','code1489','code1490','code1491','code1492','code1493','code1494','code1495','code1496','code1497','code1498','code1499','code1500') OR \"code\" IN ('code1501','code1502','code1503','code1504','code1505','code1506','code1507','code1508','code1509','code1510','code1511','code1512','code1513','code1514','code1515','code1516','code1517','code1518','code1519','code1520','code1521','code1522','code1523','code1524','code1525','code1526','code1527','code1528','code1529','code1530','code1531','code1532','code1533','code1534','code1535','code1536','code1537','code1538','code1539','code1540','code1541','code1542','code1543','code1544','code1545','code1546','code1547','code1548','code1549','code1550','code1551','code1552','code1553','code1554','code1555','code1556','code1557','code1558','code1559','code1560','code1561','code1562','code1563','code1564','code1565','code1566','code1567','code1568','code1569','code1570','code1571','code1572','code1573','code1574','code1575','code1576','code1577','code1578','code1579','code1580','code1581','code1582','code1583','code1584','code1585','code1586','code1587','code1588','code1589','code1590','code1591','code1592','code1593','code1594','code1595','code1596','code1597','code1598','code1599','code1600','code1601','code1602','code1603','code1604','code1605','code1606','code1607','code1608','code1609','code1610','code1611','code1612','code1613','code1614','code1615','code1616','code1617','code1618','code1619','code1620','code1621','code1622','code1623','code1624','code1625','code1626','code1627','code1628','code1629','code1630','code1631','code1632','code1633','code1634','code1635','code1636','code1637','code1638','code1639','code1640','code1641','code1642','code1643','code1644','code1645','code1646','code1647','code1648','code1649','code1650','code1651','code1652','code1653','code1654','code1655','code1656','code1657','code1658','code1659','code1660','code1661','code1662','code1663','code1664','code1665','code1666','code1667','code1668','code1669','code1670','code1671','code1672','code1673','code1674','code1675','code1676','code1677','code1678','code1679','code1680','code1681','code1682','code1683','code1684','code1685','code1686','code1687','code1688','code1689','code1690','code1691','code1692','code1693','code1694','code1695','code1696','code1697','code1698','code1699','code1700','code1701','code1702','code1703','code1704','code1705','code1706','code1707','code1708','code1709','code1710','code1711','code1712','code1713','code1714','code1715','code1716','code1717','code1718','code1719','code1720','code1721','code1722','code1723','code1724','code1725','code1726','code1727','code1728','code1729','code1730','code1731','code1732','code1733','code1734','code1735','code1736','code1737','code1738','code1739','code1740','code1741','code1742','code1743','code1744','code1745','code1746','code1747','code1748','code1749','code1750','code1751','code1752','code1753','code1754','code1755','code1756','code1757','code1758','code1759','code1760','code1761','code1762','code1763','code1764','code1765','code1766','code1767','code1768','code1769','code1770','code1771','code1772','code1773','code1774','code1775','code1776','code1777','code1778','code1779','code1780','code1781','code1782','code1783','code1784','code1785','code1786','code1787','code1788','code1789','code1790','code1791','code1792','code1793','code1794','code1795','code1796','code1797','code1798','code1799','code1800','code1801','code1802','code1803','code1804','code1805','code1806','code1807','code1808','code1809','code1810','code1811','code1812','code1813','code1814','code1815','code1816','code1817','code1818','code1819','code1820','code1821','code1822','code1823','code1824','code1825','code1826','code1827','code1828','code1829','code1830','code1831','code1832','code1833','code1834','code1835','code1836','code1837','code1838','code1839','code1840','code1841','code1842','code1843','code1844','code1845','code1846','code1847','code1848','code1849','code1850','code1851','code1852','code1853','code1854','code1855','code1856','code1857','code1858','code1859','code1860','code1861','code1862','code1863','code1864','code1865','code1866','code1867','code1868','code1869','code1870','code1871','code1872','code1873','code1874','code1875','code1876','code1877','code1878','code1879','code1880','code1881','code1882','code1883','code1884','code1885','code1886','code1887','code1888','code1889','code1890','code1891','code1892','code1893','code1894','code1895','code1896','code1897','code1898','code1899','code1900','code1901','code1902','code1903','code1904','code1905','code1906','code1907','code1908','code1909','code1910','code1911','code1912','code1913','code1914','code1915','code1916','code1917','code1918','code1919','code1920','code1921','code1922','code1923','code1924','code1925','code1926','code1927','code1928','code1929','code1930','code1931','code1932','code1933','code1934','code1935','code1936','code1937','code1938','code1939','code1940','code1941','code1942','code1943','code1944','code1945','code1946','code1947','code1948','code1949','code1950','code1951','code1952','code1953','code1954','code1955','code1956','code1957','code1958','code1959','code1960','code1961','code1962','code1963','code1964','code1965','code1966','code1967','code1968','code1969','code1970','code1971','code1972','code1973','code1974','code1975','code1976','code1977','code1978','code1979','code1980','code1981','code1982','code1983','code1984','code1985','code1986','code1987','code1988','code1989','code1990','code1991','code1992','code1993','code1994','code1995','code1996','code1997','code1998','code1999')", multiin);
        }
        class WhereObject01
        {
            public int id { get; set; }
            public string code { get; set; }
        }
        class WhereObject02
        {
            [Key]
            public string code { get; set; }
            public DateTime time { get; set; }
        }

        [Fact]
        public void GetSplitTableNames()
        {
            var tbname = CommonUtils.GetSplitTableNames("table1", '`', '`', 2);
            Assert.Equal("table1", tbname[0]);

            tbname = CommonUtils.GetSplitTableNames("table1", '"', '"', 2);
            Assert.Equal("table1", tbname[0]);

            tbname = CommonUtils.GetSplitTableNames("table1", '[', ']', 2);
            Assert.Equal("table1", tbname[0]);

            //---

            tbname = CommonUtils.GetSplitTableNames("schema1.table1", '`', '`', 2);
            Assert.Equal("schema1", tbname[0]);
            Assert.Equal("table1", tbname[1]);

            tbname = CommonUtils.GetSplitTableNames("schema1.table1", '"', '"', 2);
            Assert.Equal("schema1", tbname[0]);
            Assert.Equal("table1", tbname[1]);

            tbname = CommonUtils.GetSplitTableNames("schema1.table1", '[', ']', 2);
            Assert.Equal("schema1", tbname[0]);
            Assert.Equal("table1", tbname[1]);

            //---

            tbname = CommonUtils.GetSplitTableNames("`sys.table1`", '`', '`', 2);
            Assert.Equal("sys.table1", tbname[0]);

            tbname = CommonUtils.GetSplitTableNames("\"sys.table1\"", '"', '"', 2);
            Assert.Equal("sys.table1", tbname[0]);

            tbname = CommonUtils.GetSplitTableNames("[sys.table1]", '[', ']', 2);
            Assert.Equal("sys.table1", tbname[0]);

            //---

            tbname = CommonUtils.GetSplitTableNames("`schema1`.`sys.table1`", '`', '`', 2);
            Assert.Equal("schema1", tbname[0]);
            Assert.Equal("sys.table1", tbname[1]);

            tbname = CommonUtils.GetSplitTableNames("\"schema1\".\"sys.table1\"", '"', '"', 2);
            Assert.Equal("schema1", tbname[0]);
            Assert.Equal("sys.table1", tbname[1]);

            tbname = CommonUtils.GetSplitTableNames("[schema1].[sys.table1]", '[', ']', 2);
            Assert.Equal("schema1", tbname[0]);
            Assert.Equal("sys.table1", tbname[1]);
        }
    }
}
